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: David Duncan <email@hidden>
- Date: Sat, 8 Feb 2003 22:48:54 -0500
On Saturday, February 8, 2003, at 07:42 PM, Andrew GFunk wrote:
Hi! I'm a newbie to audio app development. Under OS X, is there an
easy way to get at the raw audio data (PCM) of an AIFF (or similar
type) file? All I need besides the raw audio data is the sample-rate,
resolution, and number of channels of the sound... all the other
headers that might be included in the file can be ditched. Is there
some kind of simple service I can use to store the PCM portion of the
file as an NSData object?
I plan on doing some DSP stuff on the raw audio data, then saving the
result as a new file with the same sample rate, resolution and # of
channels as the original (44.1KHz, 16-bit, stereo in most cases).
I'm writing the app in Objective-C.
Also, how would you go about spliting up the stereo data of an AIFF
file into 2 seperate NSData objects (left and right)? Then how would
you recombine the 2 (after doing some DSP on each) to form a stereo
AIFF file again?
If you want to handle nearly any AIFF file then Quicktime is the API
for you. I have rather low knowledge of Quicktime myself however, so I
can't point you at specific APIs, however it is possible to use it to
extract the audio from nearly any file that Quicktime knows how to deal
with. There isn't any calls in QT to convert to NSData/CFData (that I
know of at least) so you will have to deal with the data buffers
yourself.
Information on quicktime is available here:
<
http://developer.apple.com/quicktime/>
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.
David Duncan
_______________________________________________
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.