iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
- Subject: iPhone hardware assisted AAC > PCM conversion using ExtAudioFileRead
- From: David Blake <email@hidden>
- Date: Wed, 23 Jan 2013 11:46:47 +1100
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