• 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: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead


  • Subject: Re: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
  • From: Adriano Goncalves <email@hidden>
  • Date: Wed, 23 Jan 2013 09:32:22 +0000

According to this document: http://developer.apple.com/library/ios/documentation/audiovideo/conceptual/multimediapg/multimediaprogrammingguide.pdf

"
When using hardware-assisted decoding, the device can play only a single instance of one of the supported formats at a time. For example, if you are playing a stereo MP3 sound using the hardware codec, a second simultaneous MP3 sound will use software decoding. Similarly, you cannot simultaneously play an AAC and an ALAC sound using hardware. If the iPod application is playing an AAC or MP3 sound in the background, it has claimed the hardware codec; your application then plays AAC, ALAC, and MP3 audio using software decoding.
"

In the same document there's a table with all the formats that support hardware decoding.

Also, I believe you should set your audio session category:

http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Configuration/Configuration.html

Hope this may help you finding the solution for your question!


Adriano



On 23/01/2013, at 00:46, David Blake <email@hidden> wrote:

> In my iphone app I have a large number of PCM sound files that can be played at any time. I load the first few frames of each sound file into memory and then as they are played I load the next frames into a buffer that is read by a render callback in remote io.
>
> Problem is these files take up a lot of space and ideally I would like to reduce the size of my app by storing these in a compressed AAC format and decoding this on the fly as needed. Right now I am using ExtAudioFileSeek and ExtAudioFileRead in a background thread to decode the next buffer to be read. When doing this with AAC files right now it pushes the iPhone 4 to its absolute limits when playing the max number of potential sounds at once. I know the iPhone has a hardware decoder for the AAC format - how can I know if this is being used, or is it even possible to use this when doing offline decoding/converting via ExtAudioFileRead ?
>
> If it is using software decoding by default, my hope is that setting ExtAudioFileRead to use the hardware decode might alleviate some of the cpu stress on the iPhone 4.
>
> I have read about the kExtAudioFileProperty_CodecManufacturer / kAppleHardwareAudioCodecManufacturer property that be set on ExtAudioFile but have yet to find example code of applying this that actually works, or if it only applies to encoding and not decoding. Indeed I came across this old thread http://web.archiveorange.com/archive/v/q7bubfjRLCAE0t1Q38V2 which suggests its encoding only for ExtAudioFileRead. If this is the case are there alternative methods to doing offline hardware assisted decoding of AAC files (that are compatible with my remote io setup) ? If I am to believe that thread than audio queues are the only way to get access to the hardware decoder.
>
> Any advice/help would be greatly appreciated.
>
> Cheers,
> David
>
>
> _______________________________________________
> 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


 _______________________________________________
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

  • Follow-Ups:
    • Re: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
      • From: David Blake <email@hidden>
References: 
 >iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead (From: David Blake <email@hidden>)

  • Prev by Date: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
  • Next by Date: AU Properties and Ownership of CF objects
  • Previous by thread: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
  • Next by thread: Re: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
  • Index(es):
    • Date
    • Thread