• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting raw audio data from an AIFF file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Getting raw audio data from an AIFF file (From: Kurt Revis <email@hidden>)

  • Prev by Date: Re: 1 in 2 out MIDI ports
  • Next by Date: Re: Getting raw audio data from an AIFF file
  • Previous by thread: Re: Getting raw audio data from an AIFF file
  • Next by thread: Re: Getting raw audio data from an AIFF file
  • Index(es):
    • Date
    • Thread