Re: File format conversion
Re: File format conversion
- Subject: Re: File format conversion
- From: Brian Willoughby <email@hidden>
- Date: Wed, 4 Feb 2009 17:56:21 -0800
Fredrik, the comma operator will compile, but it won't work. The C
language allows you to combine any number of expressions on a single
line using commas, but those expressions are not related to each other
in any way. Your code is assigning Big Endian, but dropping the
Signed Integer and Packed flags.
I bet that if you turned on compiler warnings, it would tell you that
you have orphaned expressions which are doing nothing.
Bill's suggestion below is absolutely correct, although I would change
the description from "usually" to "must always" !!
Brian Willoughby
Sound Consulting
On Feb 3, 2009, at 10:36 PM, Fredrik wrote:
So, your format flags aren't complete. You need:
kAudioFormatFlagIsBigEndian
kAudioFormatFlagIsSignedInteger
kAudioFormatFlagIsPacked
Yes, that makes sense. I added these flags. What is the proper way
to do that though? I just separated them by commas now, and that
compiled fine. Like this:
OutFormat.mFormatFlags = kAudioFormatFlagIsBigEndian,
kAudioFormatFlagIsSignedInteger,
kAudioFormatFlagIsPacked;
I usually or them in:
OutFormat.mFormatFlags = kAudioFormatFlagIsBigEndian |
kAudioFormatFlagIsSignedInteger |
kAudioFormatFlagIsPacked;
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden