mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
audio: Feed output devices immediately, instead of waiting upfront.
This prevents the waste of an initial buffer of audio on many backends, and is hopefully harmless on all of them. Reference PR #12632.
This commit is contained in:
parent
48d4104ecb
commit
41636959d2
1 changed files with 2 additions and 2 deletions
|
|
@ -1256,11 +1256,11 @@ static int SDLCALL PlaybackAudioThread(void *devicep) // thread entry point
|
|||
SDL_assert(!device->recording);
|
||||
SDL_PlaybackAudioThreadSetup(device);
|
||||
|
||||
do {
|
||||
while (SDL_PlaybackAudioThreadIterate(device)) {
|
||||
if (!device->WaitDevice(device)) {
|
||||
SDL_AudioDeviceDisconnected(device); // doh. (but don't break out of the loop, just be a zombie for now!)
|
||||
}
|
||||
} while (SDL_PlaybackAudioThreadIterate(device));
|
||||
}
|
||||
|
||||
SDL_PlaybackAudioThreadShutdown(device);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue