forked from rosebudai/OpenRCT2-Web
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:
1 parent
c925ae26c1
commit
3825019a2d
1 file changed
+1
-1
@@ -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