Lossy compressed format for raw PCM on iPhone

I want to start with an audio file of a modest file and end with an array unsigned charthat can be loaded into OpenAL with alBufferData. My problem is the steps that take place in the middle.

I thought that AAC would be the way to go, but according to Apple Rincewind (around 12/08):

Currently, hardware compression formats are not supported for decoding on iPhone OS. These formats are AAC, MP3 and ALAC.

Using ExtAudioFilewith a set of client formats creates PERM errors, so it does nothing.

So, brave knowledge, what are my options? An application package with .wav and just sucking a massive download? Create your own decoder?

Any links to resources or tips that you may like will be greatly appreciated.

+3
source share
5 answers

While Vorbis and others have suggested good ones, they can be quite slow on the iPhone, as there is no hardware acceleration.

One codec that is natively supported (but only has a 4: 1 compression ratio) is ADPCM, aka ima4. It is processed through the ExtAudioFile interface and is only the smallest bit slower than loading .wav directly.

+2
source

Offline rendering of compressed audio is now possible, see QA1562 .

+4
source

, :

LGPL, , , , , , .

+1
source

You can always make your wave files mono and therefore reduce the size of your wave file in half. But this may not be the best alternative for you.

0
source

Another option for your own decoding would be Ogg Vorbis . There is even a low-memory version of their library for entire processors called "Tremor" .

0
source

Source: https://habr.com/ru/post/1702673/


All Articles