0
0

Is there an example of how to implement the support for other audio in a game? What I mean by "other audio" is the ability to play custom iPod library music instead of the game’s own.

With OpenAL, I was able to achieve this using AudioSessionGetProperty(kAudioSessionProperty_OtherAudioIsPlaying, ..), but FMOD’s own variant of the function (FMOD_iPhone_OtherAudioIsPlaying()) would always just return false without reporting an error. I tried calling it from just about anywhere: before FMOD create, after system create, after init, etc. The result was always the same.

A google/forum search for FMOD_iPhone_OtherAudioIsPlaying or FMOD_iPhone_MixWithOtherAudio both return no useful results or usage examples. The documentation in the fmodiphone.h also leaves quite a few questions.

So, what is the proper sequence of calls to get FMOD_iPhone_OtherAudioIsPlaying() to work, and how are the other functions supposed to be used to get the user’s own music to override the game’s own?

  • You must to post comments
0
0

You need to make sure FMOD is initialized using an audio session which permits mixing with external audio. You can do this by setting sessionCategory in FMOD_IPHONE_EXTRADRIVERDATA to FMOD_IPHONE_SESSIONCATEGORY_AMBIENTSOUND and pass the struct into System::init via extradriverdata. Now you can call FMOD_IPhone_OtherAudioIsPlaying to determine if the iPod is playing, if so you may want to silence your game music.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.