Mercurial > mplayer.hg
comparison libao2/ao_win32.c @ 28819:eabcc805acb1
Remove now unused buf_write_pos variable from ao_win32
author | reimar |
---|---|
date | Fri, 06 Mar 2009 18:53:29 +0000 |
parents | e3d54ef875a5 |
children | 0581bb91e78e |
comparison
equal
deleted
inserted
replaced
28818:e3d54ef875a5 | 28819:eabcc805acb1 |
---|---|
85 | 85 |
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; | |
91 static volatile int full_buffers=0; | 90 static volatile int full_buffers=0; |
92 static volatile int buffered_bytes=0; | 91 static volatile int buffered_bytes=0; |
93 | 92 |
94 | 93 |
95 static ao_info_t info = | 94 static ao_info_t info = |
238 for(i = 0; i < BUFFER_COUNT; i++) { | 237 for(i = 0; i < BUFFER_COUNT; i++) { |
239 waveBlocks[i].lpData = buffer; | 238 waveBlocks[i].lpData = buffer; |
240 buffer += BUFFER_SIZE; | 239 buffer += BUFFER_SIZE; |
241 } | 240 } |
242 buf_write=0; | 241 buf_write=0; |
243 buf_write_pos=0; | |
244 full_buffers=0; | 242 full_buffers=0; |
245 buffered_bytes=0; | 243 buffered_bytes=0; |
246 | 244 |
247 return 1; | 245 return 1; |
248 } | 246 } |
263 // stop playing and empty buffers (for seeking/pause) | 261 // stop playing and empty buffers (for seeking/pause) |
264 static void reset(void) | 262 static void reset(void) |
265 { | 263 { |
266 waveOutReset(hWaveOut); | 264 waveOutReset(hWaveOut); |
267 buf_write=0; | 265 buf_write=0; |
268 buf_write_pos=0; | |
269 full_buffers=0; | 266 full_buffers=0; |
270 buffered_bytes=0; | 267 buffered_bytes=0; |
271 } | 268 } |
272 | 269 |
273 // stop playing, keep buffers (for pause) | 270 // stop playing, keep buffers (for pause) |
299 //unprepare the header if it is prepared | 296 //unprepare the header if it is prepared |
300 if(current->dwFlags & WHDR_PREPARED) | 297 if(current->dwFlags & WHDR_PREPARED) |
301 waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR)); | 298 waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR)); |
302 x=BUFFER_SIZE; | 299 x=BUFFER_SIZE; |
303 if(x>len) x=len; | 300 if(x>len) x=len; |
304 fast_memcpy(current->lpData+buf_write_pos,data+len2,x); | 301 fast_memcpy(current->lpData,data+len2,x); |
305 full_buffers++; | 302 full_buffers++; |
306 len2+=x; len-=x; | 303 len2+=x; len-=x; |
307 buffered_bytes+=x; | 304 buffered_bytes+=x; |
308 //prepare header and write data to device | 305 //prepare header and write data to device |
309 current->dwBufferLength = x; | 306 current->dwBufferLength = x; |