diff libao2/ao_coreaudio.c @ 30234:9d09ff127c25

Add and use AF_FORMAT_IS_AC3 macro.
author reimar
date Mon, 11 Jan 2010 19:23:18 +0000
parents 02dec439f717
children 53c43f683cd7
line wrap: on
line diff
--- a/libao2/ao_coreaudio.c	Mon Jan 11 19:08:15 2010 +0000
+++ b/libao2/ao_coreaudio.c	Mon Jan 11 19:23:18 2010 +0000
@@ -263,7 +263,7 @@
     ao->b_changed_mixing = 0;
 
     /* Probe whether device support S/PDIF stream output if input is AC3 stream. */
-    if ((format & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_AC3)
+    if (AF_FORMAT_IS_AC3(format))
     {
         /* Find the ID of the default Device. */
         i_param_size = sizeof(AudioDeviceID);
@@ -344,7 +344,7 @@
 	// unsigned int
 		inDesc.mFormatFlags = kAudioFormatFlagIsPacked;
     }
-    if ((format & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_AC3) {
+    if (AF_FORMAT_IS_AC3(format)) {
         // Currently ac3 input (comes from hwac3) is always in native byte-order.
 #if HAVE_BIGENDIAN
         inDesc.mFormatFlags |= kAudioFormatFlagIsBigEndian;