• 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: Intel and four char types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intel and four char types


  • Subject: Re: Intel and four char types
  • From: William Stewart <email@hidden>
  • Date: Tue, 14 Feb 2006 17:23:08 -0800

The AudioFile API has been carefully worked to support both intel and PPC endian-ness. So, firstly, I would make a recommendation to look at adopting that API if that is possible.

Secondly, files have a defined endianness on disk - so AIFF data is all defined to be big-endian, WAV files the order is little endian. For AIFF and WAV this is also true of the endian-ness of the actual audio data they carry around. CAF Files (and M4A files) are big- endian in their descriptive portions (for instance, the chunk definitions are big-endian), but they can contain audio data of any endian-ness - based on the description of the data. So, CAF files can contain both big and little endian Linear PCM data.

The AudioFile API returns to you all of that information - the ASBD for the file's formats will describe the endian-ness of lpcm data for instance. Using the AudioConverter (or even better the ExtendedAudioFile API as a nice wrapper around these two APIs) you can read/write to files and have the converter take care of data conversions. The ExtAF API is I think particularly useful in this regard - you specify a client format that you want to deal with, and it "just works". Have a look at the PlayFile example (SimpleSDK) - UseExtAF.cpp for a good illustration of using this API

Thanks

Bill

On 14/02/2006, at 4:36 PM, email@hidden wrote:

Hi,

Does anyone know if doing four char codes like 'AIFF' still works when dealing with Intel? My code it is littered with four char codes and stuff to read and parse AIFF chunks. Any info would be welcome.

Thanks

_______________________________________________
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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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


References: 
 >Intel and four char types (From: email@hidden)

  • Prev by Date: Intel and four char types
  • Next by Date: CoreAudio SDK and strict aliasing
  • Previous by thread: Intel and four char types
  • Next by thread: CoreAudio SDK and strict aliasing
  • Index(es):
    • Date
    • Thread