Re: AudioFile -> AudioConverter -> float PCM
Re: AudioFile -> AudioConverter -> float PCM
- Subject: Re: AudioFile -> AudioConverter -> float PCM
- From: Heath Raftery <email@hidden>
- Date: Thu, 04 Aug 2005 19:33:24 +1000
Hi Marc,
On 02/08/2005, at 4:10 AM, Marc Poirier wrote:
I am trying to do the following: I want to use AudioFile to get
the contents of an audio file, then use AudioConverter to put it
all into arrays of PCM 32-bit float audio data (1 array per audio
channel). But, after several hours of looking through example
snippets, headers, and docs, I'm still pretty lost. I'm just
having a lot of trouble figuring out the interactions of
AudioBufferLists and AudioConverters, what are packets vs. frames
(possibly in relation to channels vs. samples), etc.
It is *very* difficult to get a handle on packets vs frames (good
example there), AudioBufferLists and so forth from the docs. However,
I've gone through a few examples of their use on this mailing list
which may help. Search the archives for AudioBufferList and possibly
me as the author.
I don't actually have any direct experience with AudioFile
specifically, but that's probably the relatively trivial part. Once
it clicks about frames/packets and buffer lists, I think you'll find
it quite workable.
Anyway, I'm sure that I'm not the only one who has wanted to do
this task, so I was wondering if anyone might have some example
code for this that they'd like to share? I'm just having a lot of
difficulty understanding this stuff...
Same sort of things I was thinking when I was playing with
AudioConverters. There are lots of examples in the CoreAudio SDK, but
you might find it hard to find something specific. Have a look in
AudioFile and PublicUtility. Even search the entire Examples/
CoreAudio tree for the functions you are playing with.
That said, you might actually be better served posting some of your
own code and asking specific questions about it. I know it'd be nicer
to have some example code to refer to before randomly beating out
some of your own code, but it can be very difficult getting started
otherwise. There's enough knowledge on this list to help you out with
specifics.
Heath
_______________________________________________
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