• 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: CAF file, testing chunk types?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CAF file, testing chunk types?


  • Subject: Re: CAF file, testing chunk types?
  • From: William Stewart <email@hidden>
  • Date: Wed, 30 Sep 2009 19:57:16 -0700

'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
  • Follow-Ups:
    • Re: CAF file, testing chunk types?
      • From: Darren Minifie <email@hidden>
References: 
 >CAF file, testing chunk types? (From: Darren Minifie <email@hidden>)

  • Prev by Date: CAF file, testing chunk types?
  • Next by Date: Re: CAF file, testing chunk types?
  • Previous by thread: CAF file, testing chunk types?
  • Next by thread: Re: CAF file, testing chunk types?
  • Index(es):
    • Date
    • Thread