changeset 13735:83c5f9888576

ringbuffer variable intialization fix for multifile playback patch by Rune Petersen <rune.mail-list at mail.tele.dk>
author faust3
date Fri, 22 Oct 2004 12:43:34 +0000
parents efefaa53aaf9
children e4281b5463a4
files libao2/ao_win32.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_win32.c	Fri Oct 22 00:28:03 2004 +0000
+++ b/libao2/ao_win32.c	Fri Oct 22 12:43:34 2004 +0000
@@ -166,7 +166,7 @@
 	
 	//fill waveformatex
     ZeroMemory( &wformat, sizeof(WAVEFORMATEXTENSIBLE));
-    wformat.Format.cbSize          = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE):0;
+    wformat.Format.cbSize          = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX):0;
     wformat.Format.nChannels       = channels;                
     wformat.Format.nSamplesPerSec  = rate;            
     if(format == AFMT_AC3)
@@ -222,6 +222,10 @@
         waveBlocks[i].lpData = buffer;
         buffer += BUFFER_SIZE;
     }
+    buf_write=0;
+    buf_write_pos=0;
+    full_buffers=0;
+    buffered_bytes=0;
 
     return 1;
 }