Reverted patch in revision #3139, since it changes behaviour, which isn't good
at this stage of 1.2. --HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402448
This commit is contained in:
parent
619068cfc9
commit
40849ebe5f
1 changed files with 1 additions and 13 deletions
|
@ -117,13 +117,6 @@ static AudioBootStrap *bootstrap[] = {
|
||||||
};
|
};
|
||||||
SDL_AudioDevice *current_audio = NULL;
|
SDL_AudioDevice *current_audio = 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;
|
|
||||||
|
|
||||||
/* Various local functions */
|
/* Various local functions */
|
||||||
int SDL_AudioInit(const char *driver_name);
|
int SDL_AudioInit(const char *driver_name);
|
||||||
void SDL_AudioQuit(void);
|
void SDL_AudioQuit(void);
|
||||||
|
@ -198,9 +191,7 @@ int SDLCALL SDL_RunAudio(void *audiop)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( must_init_callback_buffer ) {
|
SDL_memset(stream, silence, stream_len);
|
||||||
SDL_memset(stream, silence, stream_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! audio->paused ) {
|
if ( ! audio->paused ) {
|
||||||
SDL_mutexP(audio->mixer_lock);
|
SDL_mutexP(audio->mixer_lock);
|
||||||
|
@ -310,9 +301,6 @@ int SDL_AudioInit(const char *driver_name)
|
||||||
{
|
{
|
||||||
SDL_AudioDevice *audio;
|
SDL_AudioDevice *audio;
|
||||||
int i = 0, idx;
|
int i = 0, idx;
|
||||||
const char *envr = SDL_getenv("SDL_AUDIO_MUST_INIT_BUFFERS");
|
|
||||||
|
|
||||||
must_init_callback_buffer = ((envr != NULL) && (SDL_atoi(envr)));
|
|
||||||
|
|
||||||
/* Check to make sure we don't overwrite 'current_audio' */
|
/* Check to make sure we don't overwrite 'current_audio' */
|
||||||
if ( current_audio != NULL ) {
|
if ( current_audio != NULL ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue