First post here… hello Fmod is fantastic, and I love the Designer app 😀 I haven’t used Fmod in years, but I’m evaluating it again for an iPhone title. You guys have done an amazing job of keeping on top of it all.
Ok, my question:
Will the Fmod Designer API and FmodEx play nice with Apple’s AVAudioPlayer or AudioQueue APIs?
In other words, I’d like to use Fmod for all my game sounds, but use Apple’s API for playing M4A/MP3 music. M4A seems superior to MP2 in every way, and it seems silly to pay for an MP3 license when the OS will do it for me in hardware anyway. I assume I’d have to avoid streaming in Fmod since the AQ service will be doing it too, but that’s fine.
So, short of getting Fmod to be smart about hardware support for these formats, is it safe and/or a good idea for me to go down this path?
Oh and as a side note, [edit: nevermind]
- BananaRaffle asked 9 years ago
PS: I would be happy with ogg too, but after reading the Designer docs it seems like oggs will just be repackaged to ima4 or mp2 or whatever. Is that true, or will the oggs be packaged directly in the FSB and played as ogg at runtime?
Honestly we have not tested using FMOD along side the AudioQueue APIs, but our code doesn’t hold any exclusive locks on the sound hardware so in theory they should just mix together as you would expect. Keep in mind that we would much prefer to look at ways to do what you require with FMOD, and not need the native APIs at all.
It’s worth mentioning that the iPhone hardware only supports 1 compressed stream at a time, FMODs software codecs can handle as many as the CPU can handle. We hope to provide the ability to use the hardware decoder (even with its limitations) with FMOD in the future but we don’t support that yet.
Currently we recommend using ADPCM streams for our compressed format of choice on the iPhone due to its low CPU cost to decode (compared with MP2 / MP3 / Ogg Vorbis). Streaming off the disk with FMOD file streaming while stream with an AQ shouldn’t cause any conflict.
Also yes, we don’t support Ogg Vorbis fully in Designer as an output format yet, it is planned though (we only support PCM, ADPCM, MP2 and MP3). I cant really recommend OGG as a compressed format for iPhone either since it is currently too slow to decode. We do however have support for a new Tremor based decoder for it in the works that should make it much more efficient.
Awesome, thanks for the details, matthew. I don’t blame you for putting hardware support on the backburner given the limitations of the platform. I don’t think it’s all that unreasonable to expect people to use Apple’s API alongside Fmod for games with simple requirements (i.e. a long prerendered background track).
We set out using using Apple’s SoundEngine code that was used in some of their samples (grudgingly, and due to time constraints). It’s been deprecated with 3.0 and it had several bugs and shortcomings, not the least of which is the lack of any kind of data-driven setup. It’s just mature enough to think it might get you by, but just ‘demo’ enough to be a pain.
Anyway, as far as ogg goes: I didn’t realize the CPU cost was that high, so I wouldn’t mind if it were unavailable on the iPhone. That said, I’m sure that new decoder would be a welcome addition. The size/efficiency trade off is difficult to balance, so if ima is the best option then so be it. We’re using ima cafs at the moment, but we decompress them manually at load time. Fmod’s ability to keep them compressed would be a boon for us ram-wise, so that’s good news, and streaming them might be an excellent option as long as we can keep the iops under the "uh oh something’s wrong" threshold
In either case, being able to make those decisions case-by-case in the designer app saves us a ton of headaches 8)
Please login first to submit.