Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hardware accelerated audio decoding with OpenAL

Is it possible to use the iPhone's hardware accelerated decoding of mp3s and AAC when using the OpenAL library?

I suppose there are two possible approaches if this is possible.
iPhone specific OpenAL extensions.
iPhone APIs to decode audio into raw bytes.

I have two specific use cases.

  • Completely decode a short sound bite.
  • Piecewise decode a larger sound file so it can be streamed into OpenAL rather than loaded all at once.

update

Boy! no one's got an answer for this? Does Apple's NDA stiffle these kinds of questions? What's going on? Surely someone else using OpenAL has wanted better audio performance.

like image 949
deft_code Avatar asked Oct 07 '10 06:10

deft_code


1 Answers

There is at least one hardware (or hardware assisted) decoder in all iPhone device models. It can be accessed to convert mp3 and AAC files into raw PCM bytes by using the Audio Queue Services API. From thence you can process those bytes or send them to OpenAL.

like image 95
hotpaw2 Avatar answered Sep 28 '22 09:09

hotpaw2