diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-09 19:15:20 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-09 19:15:20 +0000 |
commit | 2c64a71a2928bed7b57ab98d6f3130354bab61ae (patch) | |
tree | b428715b70c01ad40194e20ccf41ed1a3fab9169 /libao2 | |
parent | 28531054594678e6807cc8b34092903e3e445504 (diff) | |
download | mpv-2c64a71a2928bed7b57ab98d6f3130354bab61ae.tar.bz2 mpv-2c64a71a2928bed7b57ab98d6f3130354bab61ae.tar.xz |
Do not call waveOutReset in uninit if you should wait till playing finishes,
and retry waveOutClose if it fails due to still playing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28918 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_win32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libao2/ao_win32.c b/libao2/ao_win32.c index c29e05935f..b2ba0fc573 100644 --- a/libao2/ao_win32.c +++ b/libao2/ao_win32.c @@ -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"); |