Sorry to spam the list with already-answered questions. Further poking around the list revealed that the answer lies on my own hard drive. Kevin Avila's response to essentially the same question (May 1 2006) is quoted here for interest's sake.
The modern (and easy) way I would recommend to accomplish this task would be to use QuickTime 7's AudioExtraction APIs. Check out the ADC sample codes:
On Dec 17, 2008, at 3:14 PM, Daniel Staudigel wrote:
I am trying to get a PCM stream out of out of a generic audio file. So far, I have tried:
1) Opening it with AudioFile, then trying to pipe it through a the appropriate AudioConverter, using AudioBufferFillComplexBuffer. This fails either silently (when trying to play the PCM data), or crashes because of a buffer overrun during the conversion step
2) Opening it with ExtAudioFile with the Client format set to be the desired PCM data. This fails either by playing completely garbled noise (not white noise, which is what I'd expect if it were playing MP3/AAC data as if it were PCM), or by playing nothing, or crashing in a similar buffer-overrun situation as above.
Poking around the lists I saw a reference to an old piece of sample code (ConvertFile?) that I can't get ahold of anymore. Does anybody have this, or something similar?
This seems like it should be easy. I am not familiar with CoreAudio or AudioToolbox, but I've spent enough hours on this that I am reaching out for help!
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