0
0

Hi,
I have a very strange problem with FMOD (latest version: 4.44.06) on [b:xxa0n0ew]iOS[/b:xxa0n0ew]. I initialize FMOD with flags MPEGSEARCH+IGNORETAGS+NONBLOCKING and I play various MP3 files in async I/O mode. Files are MP3 320 44,1 kHz / 16 bit.
Whatever the stream buffer size and the decode buffer size, the played sound is cut regularly (as if there is very short stallings). Maybe it would be due to the async mode which would not be fast enough but … the odd part is that when I deliberately corrupt the MP3 file, there is not nay stalling anymore. More specifically :
– If the MP3 starts with a MP3 header, there is stalling.
– If the MP3 starts in the middle of a MP3 chunk, or if I manually add one byte (or many bytes) before the beginning of the file, there isn’t.
It is as if when FMOD has to search the first MP3 header (FMOD_MPEGSEARCH), buffer settings are different than when FMOD reads immediately the MP3 header.
Do you have any clue about this ?
Thanks !
Charles

  • You must to post comments
0
0

PS : The problem occurs only with MP3, not with FLAC for example.

  • You must to post comments
0
0

When you open an MP3 on iOS, the default codec is AudioQueue (the platform native decoder), not our cross platform MPEG decoder. You can explicitly tell FMOD to use the cross platform decoder by using FMOD_CREATESOUNDEXINFO and set suggestedsoundtype to FMOD_SOUND_TYPE_MPEG. Our MPEG decoder is a bit more forgiving of corrupted MP3 files, so if the AudioQueue codec fails it will fallback to our cross platform one, scanning the file looking for valid MPEG frames. It’s hard to say why the platform native codec isn’t working properly, I could investigate if its use is essential for your app. In general for games on iOS I would use AAC for streaming music as it uses less CPU.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.