Removed campatibility behavior for 1.3
authorSam Lantinga <slouken@libsdl.org>
Thu, 05 Jul 2007 04:34:48 +0000
changeset 2147 a5f11bc178b4
parent 2146 9fcde304c7b6
child 2148 b93d0b4625f6
Removed campatibility behavior for 1.3
src/audio/SDL_audio.c
--- a/src/audio/SDL_audio.c	Thu Jul 05 02:47:54 2007 +0000
+++ b/src/audio/SDL_audio.c	Thu Jul 05 04:34:48 2007 +0000
@@ -144,13 +144,6 @@
     NULL
 };
 
-/*
- * If non-zero, use legacy behaviour (memset the callback buffer before call).
- * Changed to NOT initializing the buffer before the callback in 1.2.12.
- * Set environment SDL_AUDIO_MUST_INIT_BUFFERS=1 to get old behaviour.
- */
-static int must_init_callback_buffer = 0;
-
 static SDL_AudioDevice *
 get_audio_device(SDL_AudioDeviceID id)
 {
@@ -308,11 +301,6 @@
             }
         }
 
-        /* New code should fill buffer or set it to silence themselves. */
-        if ( must_init_callback_buffer ) {
-            SDL_memset(stream, silence, stream_len);
-        }
-
         if (!device->paused) {
             SDL_mutexP(device->mixer_lock);
             (*fill) (udata, stream, stream_len);
@@ -396,9 +384,6 @@
     int i = 0;
     int initialized = 0;
     int tried_to_init = 0;
-    const char *envr = SDL_getenv("SDL_AUDIO_MUST_INIT_BUFFERS");
-
-    must_init_callback_buffer = ((envr != NULL) && (SDL_atoi(envr)));
 
     if (SDL_WasInit(SDL_INIT_AUDIO)) {
         SDL_AudioQuit();        /* shutdown driver if already running. */