mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-04 18:29:41 +01:00
Fix 1-frame glitch when fading in from zero
The problem here is that even though we start playing the music when the volume is set to zero, mixer's state doesn't have volume zero, so whatever it plays next will be the very first quanta of the track but at the previous volume (in this case, the maximum volume). To fix this, just update mixer when we update the volume here - it's okay to not account for user volume because it ends up being zero anyway. Fixes #710.
This commit is contained in:
parent
27d0b1a1d4
commit
af2e6a2331
1 changed files with 3 additions and 0 deletions
|
@ -293,6 +293,9 @@ void musicclass::fadeMusicVolumeIn(int ms)
|
||||||
/* Ensure it starts at 0 */
|
/* Ensure it starts at 0 */
|
||||||
musicVolume = 0;
|
musicVolume = 0;
|
||||||
|
|
||||||
|
/* Fix 1-frame glitch */
|
||||||
|
Mix_VolumeMusic(0);
|
||||||
|
|
||||||
setfadeamount(ms);
|
setfadeamount(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue