Re: should I use AudioQueueOfflineRender() or AudioConverter services in iPhone OS 3.0
Re: should I use AudioQueueOfflineRender() or AudioConverter services in iPhone OS 3.0
- Subject: Re: should I use AudioQueueOfflineRender() or AudioConverter services in iPhone OS 3.0
- From: Doug Wyatt <email@hidden>
- Date: Tue, 4 Aug 2009 12:35:35 -0700
On Jul 23, 2009, at 14:53 , Andrew E. Davidson wrote:
Hi
My app needs to convert audio file from various formats (mp3, m4a,
… ) to linear PCM format. Can anyone suggest which approach I should
use?
Some back ground on my application. I have a player app that needs
to convert the audio samples into PCM, manipulate the sample, then
play them. I want to create the best possible user experience. I do
not want the user to have to press the play back button, then wait a
couple of min for the sample to be converted to PCM before playback
begins. Ideally the things would work something like
While ( !done ) {
Get buffer from file
Convert buffer to PCM
Process buffer
Enqueue buffer
}
Anyone know what kind of performance I am likely to get using each
of these approaches?
My understanding is AudioQueueOfflineRender() uses a software codec.
Is there a way to leverage the hardware codec?
AudioQueue will try to use a hardware codec if your AudioSession's
category permits its use. Read about
kAudioQueueProperty_HardwareCodecPolicy for more about this.
AudioConverter is a relatively simpler model for what you're trying to
do, and should be a bit more efficient in terms of minimizing copying
and messaging. It can only use software decoders, however.
To compare the performance of hardware and software decoders, once
you've written code to use offline AQ rendering, it's simple enough to
flip it between hardware and software and compare.
Doug
_______________________________________________
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