fixed bug with sounds not being played in native BD sound engine
authorHolger Schemel <holger.schemel@virtion.de>
Fri, 27 Dec 2024 15:10:51 +0000 (16:10 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Fri, 27 Dec 2024 15:10:53 +0000 (16:10 +0100)
This fixes a bug where sounds (when using the native BD sound engine)
were not played because other sounds with higher precedence were
already playing. However, this should only be true for two sounds to
be played at the same time, while a sound with lower precedence may
be played if another sound with higher precedence is already playing
for some time.

src/game_bd/bd_sound.c

index 37abc49bedeefcced8678dd47a89e0006e61b4aa..7849e68591c7679223daa3999c1afd84aadcc292 100644 (file)
@@ -408,9 +408,8 @@ static void play_sounds(GdSound sound1, GdSound sound2, GdSound sound3)
   // CHANNEL 1 is for small sounds
   if (sound1 != GD_S_NONE)
   {
-    // start new sound if higher or same precedence than the one currently playing
-    if (gd_sound_get_precedence(sound1) >= gd_sound_get_precedence(sound_playing(1)))
-      play_sound(1, sound1);
+    // start new sound
+    play_sound(1, sound1);
   }
   else
   {