shithub: choc

Download patch

ref: e5e4253d5c44ccef93a601e6e9df92f93fa0456f
parent: 04fdb0e0ba855327943673ae6be188b1324ea9f6
author: Simon Howard <fraggle@soulsphere.org>
date: Sun Feb 28 08:59:32 EST 2016

sound: Remove old SDL version warnings.

Older versions of libSDL had crashes on OS X when playing MIDI music.
Remove these now that we're on SDL2, as we know they're fixed.

--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -900,27 +900,6 @@
 {
     int i;
 
-    // SDL_mixer prior to v1.2.11 has a bug that causes crashes
-    // with MIDI playback.  Print a warning message if we are
-    // using an old version.
-
-#ifdef __MACOSX__
-    {
-        const SDL_version *v = Mix_Linked_Version();
-
-        if (SDL_VERSIONNUM(v->major, v->minor, v->patch)
-          < SDL_VERSIONNUM(1, 2, 11))
-        {
-            printf("\n"
-               "                   *** WARNING ***\n"
-               "      You are using an old version of SDL_mixer.\n"
-               "      Music playback on this version may cause crashes\n"
-               "      under OS X and is disabled by default.\n"
-               "\n");
-        }
-    }
-#endif
-
     //!
     // @arg <output filename>
     //
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -463,21 +463,5 @@
     M_BindIntVariable("use_libsamplerate",       &use_libsamplerate);
     M_BindFloatVariable("libsamplerate_scale",   &libsamplerate_scale);
 #endif
-
-    // Before SDL_mixer version 1.2.11, MIDI music caused the game
-    // to crash when it looped.  If this is an old SDL_mixer version,
-    // disable MIDI.
-
-#ifdef __MACOSX__
-    {
-        const SDL_version *v = Mix_Linked_Version();
-
-        if (SDL_VERSIONNUM(v->major, v->minor, v->patch)
-          < SDL_VERSIONNUM(1, 2, 11))
-        {
-            snd_musicdevice = SNDDEVICE_NONE;
-        }
-    }
-#endif
 }
 
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -397,21 +397,5 @@
             sfxVolume = 8;  musicVolume = 13;
             break;
     }
-
-    // Before SDL_mixer version 1.2.11, MIDI music caused the game
-    // to crash when it looped.  If this is an old SDL_mixer version,
-    // disable MIDI.
-
-#ifdef __MACOSX__
-    {
-        const SDL_version *v = Mix_Linked_Version();
-
-        if (SDL_VERSIONNUM(v->major, v->minor, v->patch)
-          < SDL_VERSIONNUM(1, 2, 11))
-        {
-            snd_musicdevice = SNDDEVICE_NONE;
-        }
-    }
-#endif
 }