# HG changeset patch # User reimar # Date 1236290826 0 # Node ID afbd8dd23299b8d19da5d36fd603e9c7fd16f2e7 # Parent ca641bd35f98acff80653f8eb5cde84820f21e2e Sleep based on get_delay in ao_win32 uninit instead of a loop. The loop for an unknown reason could rarely cause an endless loop. diff -r ca641bd35f98 -r afbd8dd23299 libao2/ao_win32.c --- a/libao2/ao_win32.c Thu Mar 05 21:27:05 2009 +0000 +++ b/libao2/ao_win32.c Thu Mar 05 22:07:06 2009 +0000 @@ -251,7 +251,8 @@ // close audio device static void uninit(int immed) { - if(!immed)while(buffered_bytes > 0)usec_sleep(50000); + if(!immed) + usec_sleep(get_delay() * 1000 * 1000); else buffered_bytes=0; waveOutReset(hWaveOut); waveOutClose(hWaveOut);