Fixed modplay volume ramping terminating normal voices when something sets the volume to zero

CQTexperiment
Chris Moeller 2014-04-08 02:19:06 -07:00
parent dcf97c1ede
commit d3ba707339
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;