# HG changeset patch # User Sam Lantinga # Date 1384132738 28800 # Sun Nov 10 17:18:58 2013 -0800 # Node ID f939c8dc83c31623f9c1a7917defecf52823088f # Parent 713c6a333c33c70f7d32d129efee2bdcc2fef568 Fixed bug 1449 - SDL_CloseAudio takes 2 seconds to return when using the Pulseaudio driver. We don't actually need to wait for the drain to complete, it's an asynchronous operation. diff -r 713c6a333c33 -r f939c8dc83c3 src/audio/pulseaudio/SDL_pulseaudio.c --- a/src/audio/pulseaudio/SDL_pulseaudio.c Sun Nov 10 14:48:44 2013 -0800 +++ b/src/audio/pulseaudio/SDL_pulseaudio.c Sun Nov 10 17:18:58 2013 -0800 @@ -275,6 +275,11 @@ return; } + /* Fix bug 1449 - + In some cases the PulseAudio driver waits a really long time to drain. + We've requested it, but we don't really need to wait for it to complete. + */ +/* while (PULSEAUDIO_pa_operation_get_state(o) != PA_OPERATION_DONE) { if (PULSEAUDIO_pa_context_get_state(h->context) != PA_CONTEXT_READY || PULSEAUDIO_pa_stream_get_state(h->stream) != PA_STREAM_READY || @@ -283,7 +288,7 @@ break; } } - +*/ PULSEAUDIO_pa_operation_unref(o); }