changeset 13887:48ce49693b3c

respect immed uninit flag, initialize ao_data.outburst.
author reimar
date Sat, 06 Nov 2004 22:33:17 +0000
parents ae7fe5c13f50
children a28322ddafba
files libao2/ao_sdl.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_sdl.c	Sat Nov 06 19:35:24 2004 +0000
+++ b/libao2/ao_sdl.c	Sat Nov 06 22:33:17 2004 +0000
@@ -280,6 +280,7 @@
 
 	mp_msg(MSGT_AO,MSGL_V,"SDL: buf size = %d\n",obtained.size);
 	ao_data.buffersize=obtained.size;
+	ao_data.outburst = CHUNK_SIZE;
 	
 	reset();
 	/* unsilence audio, if callback is ready */
@@ -291,6 +292,7 @@
 // close audio device
 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);
 	SDL_CloseAudio();