mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
2853105459
commit
2c64a71a29
|
@ -243,8 +243,9 @@ static void uninit(int immed)
|
||||||
{
|
{
|
||||||
if(!immed)
|
if(!immed)
|
||||||
usec_sleep(get_delay() * 1000 * 1000);
|
usec_sleep(get_delay() * 1000 * 1000);
|
||||||
|
else
|
||||||
waveOutReset(hWaveOut);
|
waveOutReset(hWaveOut);
|
||||||
waveOutClose(hWaveOut);
|
while (waveOutClose(hWaveOut) == WAVERR_STILLPLAYING) usec_sleep(0);
|
||||||
mp_msg(MSGT_AO, MSGL_V,"waveOut device closed\n");
|
mp_msg(MSGT_AO, MSGL_V,"waveOut device closed\n");
|
||||||
free(waveBlocks);
|
free(waveBlocks);
|
||||||
mp_msg(MSGT_AO, MSGL_V,"buffer memory freed\n");
|
mp_msg(MSGT_AO, MSGL_V,"buffer memory freed\n");
|
||||||
|
|
Loading…
Reference in New Issue