[Mplayer-cvslog] CVS: main/libao2 ao_win32.c,1.11,1.12

Sascha Sommer CVS syncmail at mplayerhq.hu
Sat Jun 26 13:20:23 CEST 2004


CVS change done by Sascha Sommer CVS

Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv25344/libao2

Modified Files:
	ao_win32.c 
Log Message:
ac3 passthrough, initial patch by Gianluigi Tiesi <sherpya at netfarm.it>

Index: ao_win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_win32.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ao_win32.c	7 Apr 2004 22:27:33 -0000	1.11
+++ ao_win32.c	26 Jun 2004 11:20:20 -0000	1.12
@@ -121,11 +121,20 @@
 	//fill waveformatex
     ZeroMemory( &wformat, sizeof(WAVEFORMATEX));
     wformat.cbSize          = 0; /* size of _extra_ info */
-	wformat.wFormatTag      = WAVE_FORMAT_PCM;  
     wformat.nChannels       = channels;                
     wformat.nSamplesPerSec  = rate;            
-    wformat.wBitsPerSample  = audio_out_format_bits(format); 
-    wformat.nBlockAlign     = wformat.nChannels * (wformat.wBitsPerSample >> 3);
+    if(format == AFMT_AC3)
+    {
+        wformat.wFormatTag      = WAVE_FORMAT_DOLBY_AC3_SPDIF;
+        wformat.wBitsPerSample  = 16;
+        wformat.nBlockAlign     = 4;
+    }
+    else 
+    {
+        wformat.wFormatTag      = WAVE_FORMAT_PCM;
+        wformat.wBitsPerSample  = audio_out_format_bits(format); 
+        wformat.nBlockAlign     = wformat.nChannels * (wformat.wBitsPerSample >> 3);
+    }       
     wformat.nAvgBytesPerSec = wformat.nSamplesPerSec * wformat.nBlockAlign;
  	
     //open sound device




More information about the MPlayer-cvslog mailing list