Re-create sound channel only for looping sounds

This partly reverts b264a73247 and
ensures that non-looping sounds (e. g. guests screams) do not get
replayed until their condition becomes false and then true again.
This commit is contained in:
Severin Paul Höfer committed 2025-01-02 14:37:03 +01:00
1 parent c925ae26c1
commit 3825019a2d
1 file changed
+1 -1
+1 -1
View File
@@ -469,7 +469,7 @@ namespace OpenRCT2::Audio
volume = volume / 8;
volume = std::max(volume - 0x1FFF, -10000);
if (sound.Channel != nullptr && sound.Channel->IsDone())
if (sound.Channel != nullptr && sound.Channel->IsDone() && IsLoopingSound(sound.Id))
{
sound.Id = SoundId::Null;
sound.Channel = nullptr;