shithub: choc

Download patch

ref: 9ab44a4fec763add09ca77df0e57da99928c4054
parent: 81fe8ce185e44714ab55fb194294d77a7976d91e
author: James Haley <[email protected]>
date: Thu Aug 25 20:22:55 EDT 2016

Mix_HaltChannel must always be called when releasing a sound. Fixes #773.

--- a/src/i_sdlsound.c
+++ b/src/i_sdlsound.c
@@ -348,6 +348,9 @@
         return;
     }
 
+    // DEBUG
+    Mix_HaltChannel(channel);
+
     channels_playing[channel] = NULL;
 
     UnlockAllocatedSound(snd);
@@ -995,8 +998,6 @@
     {
         return;
     }
-
-    Mix_HaltChannel(handle);
 
     // Sound data is no longer needed; release the
     // sound data being used for this channel