# HG changeset patch # User reimar # Date 1236255910 0 # Node ID ceafb4a247532c2ba19254ef57424341e14329ea # Parent b7100293c9081d9679ff8010c82411bfb1aba76d full_buffers and buffered_bytes must be volatile because they are used from different threads, hopefully this fixes an uninit hang. The code still relies on luck for thread-safety though. diff -r b7100293c908 -r ceafb4a24753 libao2/ao_win32.c --- a/libao2/ao_win32.c Thu Mar 05 07:00:45 2009 +0000 +++ b/libao2/ao_win32.c Thu Mar 05 12:25:10 2009 +0000 @@ -88,8 +88,8 @@ static HWAVEOUT hWaveOut; //handle to the waveout device static unsigned int buf_write=0; static unsigned int buf_write_pos=0; -static int full_buffers=0; -static int buffered_bytes=0; +static volatile int full_buffers=0; +static volatile int buffered_bytes=0; static ao_info_t info =