Mercurial > mplayer.hg
comparison libao2/ao_win32.c @ 28776:ceafb4a24753
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.
author | reimar |
---|---|
date | Thu, 05 Mar 2009 12:25:10 +0000 |
parents | 0f42fb42843c |
children | afbd8dd23299 |
comparison
equal
deleted
inserted
replaced
28775:b7100293c908 | 28776:ceafb4a24753 |
---|---|
86 | 86 |
87 static WAVEHDR* waveBlocks; //pointer to our ringbuffer memory | 87 static WAVEHDR* waveBlocks; //pointer to our ringbuffer memory |
88 static HWAVEOUT hWaveOut; //handle to the waveout device | 88 static HWAVEOUT hWaveOut; //handle to the waveout device |
89 static unsigned int buf_write=0; | 89 static unsigned int buf_write=0; |
90 static unsigned int buf_write_pos=0; | 90 static unsigned int buf_write_pos=0; |
91 static int full_buffers=0; | 91 static volatile int full_buffers=0; |
92 static int buffered_bytes=0; | 92 static volatile int buffered_bytes=0; |
93 | 93 |
94 | 94 |
95 static ao_info_t info = | 95 static ao_info_t info = |
96 { | 96 { |
97 "Windows waveOut audio output", | 97 "Windows waveOut audio output", |