3.16 AudioEngine decode all sound in memory on IOS

Hello,

I am trying to use the 3.16 AudioEngine, but it appears that it uses openAL for ALL sounds, whatever their original format, which means that all sounds are decoded in memory in PCM format before being played (see here for reference).

This is very annoying as IOS as a way to playback one compressed track directly from file using AVAudioPlayer (which is used in SimpleAudioEngine).

Is there a way to use this feature with the new 3.16 AudioPlayer? Or am I forced to use the simpleAudioEngine?

Thanks!!

If I don’t understand wrong, all sound data will be converted to uncompressed data and send to audio adapter, in other words all of any format of sound data from file will be converted to same format that audio adapter can understand it.

Yes, any sound format (caf, mp3, wav, ogg …) will first be decoded in pcm format that openAL can read.

This lead to unnecessary memory consumption and CPU usage, because IOS can handle a single compressed file played directly from the file system.

If you take a look at SimpleAudioEngine, this is how it is done, but AudioEngine only ever uses openAL for playing sounds (see ReadDataTask and AudioPlayer for reference)