[MPlayer-cvslog] r30282 - in trunk/libao2: ao_dsound.c ao_win32.c

reimar subversion at mplayerhq.hu
Mon Jan 11 21:02:46 CET 2010


Author: reimar
Date: Mon Jan 11 21:02:46 2010
New Revision: 30282

Log:
More uses of AF_FORMAT_IS_AC3

Modified:
   trunk/libao2/ao_dsound.c
   trunk/libao2/ao_win32.c

Modified: trunk/libao2/ao_dsound.c
==============================================================================
--- trunk/libao2/ao_dsound.c	Mon Jan 11 20:55:07 2010	(r30281)
+++ trunk/libao2/ao_dsound.c	Mon Jan 11 21:02:46 2010	(r30282)
@@ -327,7 +327,7 @@ static int write_buffer(unsigned char *d
 
   if (SUCCEEDED(res))
   {
-  	if( (ao_data.channels == 6) && (ao_data.format!=AF_FORMAT_AC3) ) {
+  	if( (ao_data.channels == 6) && !AF_FORMAT_IS_AC3(ao_data.format) ) {
   	    // reorder channels while writing to pointers.
   	    // it's this easy because buffer size and len are always
   	    // aligned to multiples of channels*bytespersample
@@ -456,7 +456,7 @@ static int init(int rate, int channels, 
 	wformat.Format.cbSize          = (channels > 2) ? sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX) : 0;
 	wformat.Format.nChannels       = channels;
 	wformat.Format.nSamplesPerSec  = rate;
-	if (format == AF_FORMAT_AC3) {
+	if (AF_FORMAT_IS_AC3(format)) {
 		wformat.Format.wFormatTag      = WAVE_FORMAT_DOLBY_AC3_SPDIF;
 		wformat.Format.wBitsPerSample  = 16;
 		wformat.Format.nBlockAlign     = 4;

Modified: trunk/libao2/ao_win32.c
==============================================================================
--- trunk/libao2/ao_win32.c	Mon Jan 11 20:55:07 2010	(r30281)
+++ trunk/libao2/ao_win32.c	Mon Jan 11 21:02:46 2010	(r30282)
@@ -180,7 +180,7 @@ static int init(int rate,int channels,in
     wformat.Format.cbSize          = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX):0;
     wformat.Format.nChannels       = channels;
     wformat.Format.nSamplesPerSec  = rate;
-    if(format == AF_FORMAT_AC3)
+    if(AF_FORMAT_IS_AC3(format))
     {
         wformat.Format.wFormatTag      = WAVE_FORMAT_DOLBY_AC3_SPDIF;
         wformat.Format.wBitsPerSample  = 16;


More information about the MPlayer-cvslog mailing list