From 9f6596d46651d40b1be17612b563fa32e43f76c5 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 20 Jan 2005 07:32:47 +0000 Subject: [PATCH] Fix fade in/out bits. --- src/xpdev/xpbeep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c index e47d97f4af..369dae5f43 100644 --- a/src/xpdev/xpbeep.c +++ b/src/xpdev/xpbeep.c @@ -60,7 +60,7 @@ void makesine(double freq, unsigned char *wave, int samples) wave[i]=127; } /* Fade out */ - for(k=10;k>1;k--) { + for(k=2;k<=10;k++) { for(;i>0;i--) { if(!endhigh && wave[i]<=127) break; @@ -96,7 +96,7 @@ void makesine(double freq, unsigned char *wave, int samples) wave[i]=127; } /* Fade in */ - for(k=10;k>1;k--) { + for(k=2;k<=10;k++) { for(;i<samples;i--) { if(!starthigh && wave[i]<=127) break; -- GitLab