Re: Getting raw audio data from an AIFF file
Re: Getting raw audio data from an AIFF file
- Subject: Re: Getting raw audio data from an AIFF file
- From: Brian Willoughby <email@hidden>
- Date: Tue, 18 Feb 2003 03:44:12 -0800
[ The easy way to fix this is to treat these values as single
[ numbers, not arrays of characters. In standard C you can use the
[ type uint32_t. If you are including any of Apple's headers you
[ can use UInt32 instead.
[
[ UInt32 kSomeConstant = 'AIFF';
[ UInt32 myVariable;
[ if (myVariable == kSomeConstant)
[ // do whatever you like
You are using a multi-character character constant here. This is something
that is not standard C. I think has evolved as common practice in Mac
programming, but is not really very portable.
A portable alternative would be the following:
{
const long example = *(long *)"AIFF";
long variable;
if (example == variable)
// do whatever
}
I only bring this up in case anyone is writing open source code and/or hoping
to write something that will work with Darwin on Intel.
Brian Willoughby
Sound Consulting
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.