I think the iPhone has hardware to decompress MP3 and other format on the fly, but ogg must decompress it by software. Am I right?
So, my question is, waht format (mp3,ogg…) and parameters (sample rate, bits…) are better from a computationally point of view better?
Evidently using FMOD for iPhone.
Thanks a lot. 😉
- riruilo asked 8 years ago
One thing that I have found is that the iphone will only play one compressed file at a time (mp3 as an example), and the other files will have to be uncompressed (.wav or aiff).
I would use any large file you need played (music for example) as a compressed file, and any small interface type sounds as uncompressed.
As far as quality of compression goes, it really comes down to ram. The higher the bit rate of a compressed file the better the quality, but the larger the file size.
Compressed file types (mp3-ogg etc,) do not have sample rates in the sense that they have already been sampled from their original analog voltage. You have a bit rate that is sampling the PCM based ".wav" or "aiff" file. Those uncompressed containers have a "Bit depth" (which represents the digital dynamic range) and a "sample rate" which represents the accuracy of frequency response.
I would make my compressed container bit rate as large as possible, while still meeting the ram and storage needs of the app itself.
[quote="Tom-engineaudio":lu8eirbq]One thing that I have found is that the iphone will only play one compressed file at a time (mp3 as an example), and the other files will have to be uncompressed (.wav or aiff).
Really??? Are you sure??
It sounds very strange.
Thanks for reply.
- riruilo answered 8 years ago
Only a single instance of one of these formats can play at a time:
Table 2-4 iPhone OS: restricted playback audio formats
"AAC – Apple Lossless – MP3 "
Try using the IMA4 or wave file type if loading multiple sounds of the same type (instead of a lossy MP3 or AAC)
They say that "This restriction maximizes CPU performance and battery life"
Please note that the Apple document that specifies restrictions to the playback of MP3 and other hardware supported types are strictly that, hardware only. Currently FMOD doesn’t make use of the iPhone hardware due to it’s limitations (we may support it in the future though).
FMOD mixes and decompresses using software, you can have as many compressed files as you like playing at once, you are only restricted by your CPU budget for the application.
So to answer your original question, all formats using FMOD are software decompressed, this can be done up front or while streaming off the disk to minimize memory usage at the expense of CPU. At the moment I would recommend ADPCM as the compressed format to use and PCM for any short sounds. Although this all comes down to how much processor you can afford to spend and how much memory you have available.
Please login first to submit.