summaryrefslogtreecommitdiffstats
path: root/libao2/ao_sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libao2/ao_sdl.c')
-rw-r--r--libao2/ao_sdl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index b75d6dd27e..d2e506cf55 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -293,8 +293,7 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
static void uninit(int immed){
mp_msg(MSGT_AO,MSGL_V,"SDL: Audio Subsystem shutting down!\n");
if (!immed)
- while(buf_free() < BUFFSIZE - CHUNK_SIZE)
- usec_sleep(50000);
+ usec_sleep(get_delay() * 1000 * 1000);
SDL_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
}