foxygit / doom Log in
commit 748e992f79d73d2f0770ea783be7e0e068d81f6a
Author:     Jonathan Dowland <jon+github@alcopop.org>
AuthorDate: Tue Mar 1 22:34:09 2016 +0000
Commit:     Jonathan Dowland <jon+github@alcopop.org>
CommitDate: Wed Mar 2 10:18:23 2016 +0000

    Remove remaining setpanning_workaround code

    Finish removing an old compatibility check setpanning_workaround,
    completing work begun in d721228ed1a9df515d51c2d57ea3f7199f86daa5.
---
 src/i_sdlsound.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/src/i_sdlsound.c b/src/i_sdlsound.c
index fe183675..f834602d 100644
--- a/src/i_sdlsound.c
+++ b/src/i_sdlsound.c
@@ -56,8 +56,6 @@ struct allocated_sound_s
     allocated_sound_t *prev, *next;
 };

-static boolean setpanning_workaround = false;
-
 static boolean sound_initialized = false;

 static allocated_sound_t *channels_playing[NUM_CHANNELS];
@@ -899,16 +897,6 @@ static void I_SDL_UpdateSoundParams(int handle, int vol, int sep)
     if (right < 0) right = 0;
     else if (right > 255) right = 255;

-    // SDL_mixer version 1.2.8 and earlier has a bug in the Mix_SetPanning
-    // function.  A workaround is to call Mix_UnregisterAllEffects for
-    // the channel before calling it.  This is undesirable as it may lead
-    // to the channel volumes resetting briefly.
-
-    if (setpanning_workaround)
-    {
-        Mix_UnregisterAllEffects(handle);
-    }
-
     Mix_SetPanning(handle, left, right);
 }