mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user