mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-04 01:01:07 +00:00
Removed campatibility behavior for 1.3
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402417
This commit is contained in:
parent
18d893d82a
commit
1be5906ea3
@ -144,13 +144,6 @@ static AudioBootStrap *bootstrap[] = {
|
||||
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 @@ SDL_RunAudio(void *devicep)
|
||||
}
|
||||
}
|
||||
|
||||
/* 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 @@ SDL_AudioInit(const char *driver_name)
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user