changeset 174:520c18f581c7

Fix handling of fadeouts when volume envelope is not enabled.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 06 Oct 2012 09:48:04 +0300
parents fe0c7ae05776
children 4192aa6d5af6
files jssplr.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jssplr.c	Sat Oct 06 09:38:16 2012 +0300
+++ b/jssplr.c	Sat Oct 06 09:48:04 2012 +0300
@@ -258,12 +258,9 @@
     else
     {
         // If the envelope is not used, set max volume
-        if (chn->iCVolEnv != mpMaxVol)
-        {
-            chn->iCVolEnv = mpMaxVol;
-            chn->iCFadeOutVol = mpMaxFadeoutVol;
-            JMPSETNDFLAGS(cdfNewVolume);
-        }
+        chn->iCVolEnv = mpMaxVol;
+        chn->iCFadeOutVol = chn->iCKeyOff ? 0 : mpMaxFadeoutVol;
+        JMPSETNDFLAGS(cdfNewVolume);
     }
 
     // Process the panning envelope