mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
30a6c8428c
For looping sounds the game script regularly checks if the sound has finished playing, then plays it again. This works in the original interpreter (possibly because it checks the first buffer of double-buffered sound output); it does not work in ScummVM because the mixer will return if the sound has actually stopped playing. This causes an audible gap when the sound loops. This commit alters the sfSoundPlaying function to check if the current elapsed playing time is less than 100ms before the end of the sound, which fixes the issue. Not sure if this change is necessary or desirable for games other than Return to Zork. This fixes issue #6443.