Skip to content

Commit 66b2f11

Browse files
committed
Fix looping sounds
1 parent 1640b89 commit 66b2f11

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/engine/audio/Audio.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ namespace Audio {
197197
auto& loop = entityLoops[i];
198198
if (loop.sound and not loop.addedThisFrame) {
199199
// The loop wasn't added this frame, that means it has to be removed.
200-
loop.sound->FadeOutAndDie();
201-
loop = {false, nullptr, -1, -1};
202-
200+
loop.sound->SetSoundGain( 0 );
203201
} else if (loop.oldSfx != loop.newSfx) {
204202
// The last sfx added in the frame is not the current one being played
205203
// To mimic the previous sound system's behavior we sart playing the new one.

0 commit comments

Comments
 (0)