[MPlayer-dev-eng] [PATCH] ao_sdl: respect immed uninit flag and initialize outburst.
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Nov 5 08:47:25 CET 2004
Hi,
when immed is set the ao should uninitialize immediately. Also, outburst
should be initialized to a sane value (although it worked with out to
now, although I couldn't find another place where it is initialized???
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libao2/ao_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_sdl.c,v
retrieving revision 1.36
diff -u -r1.36 ao_sdl.c
--- libao2/ao_sdl.c 31 Oct 2004 21:02:47 -0000 1.36
+++ libao2/ao_sdl.c 5 Nov 2004 10:29:14 -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();
More information about the MPlayer-dev-eng
mailing list