'desc' is an "OSType" - its really just an int (4 bytes), and using these 4 char codes is a way to create unique numbers that are somewhat human readable.
In a CAF file, these are all "big endian" order, so on an Intel machine you will have to flip the endian order (as intel CPUs are of course little endian). Then you end up with a number, and you can do a numerical comparison between that native-endian number and the various CAF chunk types until you fine it (a case statement is probably what you will end up writing)
Bill
On Sep 30, 2009, at 6:28 PM, Darren Minifie wrote: Hi everyone
I apologize for this "noob" question but I've never run into it before (and I am sure to receive a 'google it' response, but haven't found what i'm looking for).
I am writing a CAF file parser for fun. I have parsed the four character strings that describe the chunk types, and have them stored as NSStrings. I want to be able to output a more meaningful name however. In CAFFile.h, an enum is defined that describes the chunk types:
// CAF Chunk Types enum { kCAF_StreamDescriptionChunkID = 'desc', kCAF_AudioDataChunkID = 'data', kCAF_ChannelLayoutChunkID = 'chan', kCAF_FillerChunkID = 'free',
etc.... }
My question is: what are the datatypes of this enum? i know that single characters in single quotes are chars (e.g 'a', 'b'), and string literals are in double quotes ("a", "b"), but what are these and how to I test them against the strings that I have parsed?
Thanks for any help.
-- Darren Minifie Computer Science Masters Candidate University of Victoria, BC. Canada My Rants: www.noisyair.com
My Band: www.ohsnapmusic.com
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
|