From d3ba70733985c1ba80f958c3c07ac6975c440a9a Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Tue, 8 Apr 2014 02:19:06 -0700 Subject: [PATCH] Fixed modplay volume ramping terminating normal voices when something sets the volume to zero --- Frameworks/modplay/modplay/ft2play.c | 2 +- Frameworks/modplay/modplay/st3play.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Frameworks/modplay/modplay/ft2play.c b/Frameworks/modplay/modplay/ft2play.c index 619ed40bf..e6ce098ba 100644 --- a/Frameworks/modplay/modplay/ft2play.c +++ b/Frameworks/modplay/modplay/ft2play.c @@ -2800,7 +2800,7 @@ static void voiceSetVolume(PLAYER *p, uint8_t i, float vol, uint8_t sharp) { if (vol) p->voice[i].volume = 0; - else if (sharp != 3) + else if (i > 127) p->voice[i].rampTerminates = 1; } diff --git a/Frameworks/modplay/modplay/st3play.c b/Frameworks/modplay/modplay/st3play.c index c78f7040e..1aaa7ca8d 100644 --- a/Frameworks/modplay/modplay/st3play.c +++ b/Frameworks/modplay/modplay/st3play.c @@ -2830,7 +2830,7 @@ void voiceSetVolume(PLAYER *p, uint8_t voiceNumber, float volume, uint8_t sharp) { if (volume) p->voice[voiceNumber].volume = 0.0f; - else if (sharp != 3) + else if (voiceNumber > 31) p->voice[voiceNumber].rampTerminates = 1; } p->voice[voiceNumber].targetVol = volume;