From b085349e8647a10affde0a5b64c07714d3013817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Brammer?= Date: Tue, 7 Jul 2009 14:27:19 +0200 Subject: [PATCH] SDL_mixer: Don't halt all channels when halting a halted channel Mix_Playing(-1) counts the number of playing channels instead of returning that the channel -1 is not playing, and Mix_HaltChannel(-1) stops everything. --- engine/src/C4SoundSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/C4SoundSystem.cpp b/engine/src/C4SoundSystem.cpp index a20f32dfd..b64a0618a 100644 --- a/engine/src/C4SoundSystem.cpp +++ b/engine/src/C4SoundSystem.cpp @@ -309,7 +309,7 @@ BOOL C4SoundInstance::Playing() : timeGetTime() < iStarted + pEffect->Length; #endif #ifdef HAVE_LIBSDL_MIXER - return Application.MusicSystem.MODInitialized && Mix_Playing(iChannel); + return Application.MusicSystem.MODInitialized && (iChannel != -1) && Mix_Playing(iChannel); #endif return false; }