Reverted patch in revision #3139, since it changes behaviour, which isn't good SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Mon, 09 Jul 2007 00:25:31 +0000
branchSDL-1.2
changeset 4024000a99b4be87
parent 4023 5ec68276e4de
child 4025 3ee8c808638b
Reverted patch in revision #3139, since it changes behaviour, which isn't good
at this stage of 1.2.
src/audio/SDL_audio.c
     1.1 --- a/src/audio/SDL_audio.c	Sun Jul 08 22:58:33 2007 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Mon Jul 09 00:25:31 2007 +0000
     1.3 @@ -117,13 +117,6 @@
     1.4  };
     1.5  SDL_AudioDevice *current_audio = NULL;
     1.6  
     1.7 -/*
     1.8 - * If non-zero, use legacy behaviour (memset the callback buffer before call).
     1.9 - * Changed to NOT initializing the buffer before the callback in 1.2.12.
    1.10 - * Set environment SDL_AUDIO_MUST_INIT_BUFFERS=1 to get old behaviour.
    1.11 - */
    1.12 -static int must_init_callback_buffer = 0;
    1.13 -
    1.14  /* Various local functions */
    1.15  int SDL_AudioInit(const char *driver_name);
    1.16  void SDL_AudioQuit(void);
    1.17 @@ -198,9 +191,7 @@
    1.18  			}
    1.19  		}
    1.20  
    1.21 -		if ( must_init_callback_buffer ) {
    1.22 -			SDL_memset(stream, silence, stream_len);
    1.23 -		}
    1.24 +		SDL_memset(stream, silence, stream_len);
    1.25  
    1.26  		if ( ! audio->paused ) {
    1.27  			SDL_mutexP(audio->mixer_lock);
    1.28 @@ -310,9 +301,6 @@
    1.29  {
    1.30  	SDL_AudioDevice *audio;
    1.31  	int i = 0, idx;
    1.32 -	const char *envr = SDL_getenv("SDL_AUDIO_MUST_INIT_BUFFERS");
    1.33 -
    1.34 -	must_init_callback_buffer = ((envr != NULL) && (SDL_atoi(envr)));
    1.35  
    1.36  	/* Check to make sure we don't overwrite 'current_audio' */
    1.37  	if ( current_audio != NULL ) {