*/
/*=============================================================================
CAStreamBasicDescription.cpp
-
+
=============================================================================*/
#include "CAConditionalMacros.h"
if (mFormatID == kAudioFormatLinearPCM) {
bool isInt = !(mFormatFlags & kLinearPCMFormatFlagIsFloat);
int wordSize = SampleWordSize();
- const char *endian = (wordSize > 1) ?
+ const char *endian = (wordSize > 1) ?
((mFormatFlags & kLinearPCMFormatFlagIsBigEndian) ? " big-endian" : " little-endian" ) : "";
- const char *sign = isInt ?
+ const char *sign = isInt ?
((mFormatFlags & kLinearPCMFormatFlagIsSignedInteger) ? " signed" : " unsigned") : "";
const char *floatInt = isInt ? "integer" : "float";
char packed[32];
const char *commaSpace = (packed[0]!='\0') || (align[0]!='\0') ? ", " : "";
fprintf(f, "%ld-bit%s%s %s%s%s%s%s\n",
- mBitsPerChannel, endian, sign, floatInt,
+ mBitsPerChannel, endian, sign, floatInt,
commaSpace, packed, align, deinter);
} else if (mFormatID == 'alac') { // kAudioFormatAppleLossless
int sourceBits = 0;
fprintf(f, "%ld frames/packet\n", mFramesPerPacket);
}
else
- fprintf(f, "%ld bits/channel, %ld bytes/packet, %ld frames/packet, %ld bytes/frame\n",
+ fprintf(f, "%ld bits/channel, %ld bytes/packet, %ld frames/packet, %ld bytes/frame\n",
mBitsPerChannel, mBytesPerPacket, mFramesPerPacket, mBytesPerFrame);
}
UInt32 yFlags = y.mFormatFlags;
// match wildcards
- if (x.mFormatID == 0 || y.mFormatID == 0 || xFlags == 0 || yFlags == 0)
+ if (x.mFormatID == 0 || y.mFormatID == 0 || xFlags == 0 || yFlags == 0)
return true;
if (x.mFormatID == kAudioFormatLinearPCM)
#define MATCH(name) ((x.name) == 0 || (y.name) == 0 || (x.name) == (y.name))
- return
+ return
// check the sample rate
(fiszero(x.mSampleRate) || fiszero(y.mSampleRate) || fequal(x.mSampleRate, y.mSampleRate))
&& MATCH(mFormatID)
// check the format flags
- && MatchFormatFlags(x, y)
+ && MatchFormatFlags(x, y)
// check the bytes per packet
- && MATCH(mBytesPerPacket)
+ && MATCH(mBytesPerPacket)
// check the frames per packet
- && MATCH(mFramesPerPacket)
+ && MATCH(mFramesPerPacket)
// check the bytes per frame
- && MATCH(mBytesPerFrame)
+ && MATCH(mBytesPerFrame)
// check the channels per frame
- && MATCH(mChannelsPerFrame)
+ && MATCH(mChannelsPerFrame)
// check the channels per frame
&& MATCH(mBitsPerChannel) ;