[MPlayer-cvslog] r28918 - trunk/libao2/ao_win32.c

reimar subversion at mplayerhq.hu
Mon Mar 9 20:15:21 CET 2009


Author: reimar
Date: Mon Mar  9 20:15:20 2009
New Revision: 28918

Log:
Do not call waveOutReset in uninit if you should wait till playing finishes,
and retry waveOutClose if it fails due to still playing.

Modified:
   trunk/libao2/ao_win32.c

Modified: trunk/libao2/ao_win32.c
==============================================================================
--- trunk/libao2/ao_win32.c	Mon Mar  9 19:21:47 2009	(r28917)
+++ trunk/libao2/ao_win32.c	Mon Mar  9 20:15:20 2009	(r28918)
@@ -243,8 +243,9 @@ static void uninit(int immed)
 {
     if(!immed)
 	usec_sleep(get_delay() * 1000 * 1000);
+    else
 	waveOutReset(hWaveOut);
-	waveOutClose(hWaveOut);
+    while (waveOutClose(hWaveOut) == WAVERR_STILLPLAYING) usec_sleep(0);
 	mp_msg(MSGT_AO, MSGL_V,"waveOut device closed\n");
     free(waveBlocks);
 	mp_msg(MSGT_AO, MSGL_V,"buffer memory freed\n");



More information about the MPlayer-cvslog mailing list