• 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: should I use AudioQueueOfflineRender() or AudioConverter services in iPhone OS 3.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: just how stable is kMIDIPropertyUniqueID ?
  • Next by Date: AudioFileStreamParseBytes returning -50
  • Previous by thread: Re: just how stable is kMIDIPropertyUniqueID ?
  • Next by thread: AudioFileStreamParseBytes returning -50
  • Index(es):
    • Date
    • Thread