What do you suggest is the best method of handling the iPhone app delegate methods relating to powering off an receiving a phone call?
My app runs FMOD with in the Audio Category
so the FMOD engine will continue to run when the iPhone is turned off ( into standby I should say).
How do I best shutdown the FMOD engine to allow for no activity ( thus saving significant power) during sleep. Do I have to destroy and remove all sounds, channels etc then do a..
- tdc asked 8 years ago
If you want the device to go silent (and stop activity) when you press the lock button I suggest you use FMOD_IPHONE_SESSIONCATEGORY_AMBIENTSOUND or FMOD_IPHONE_SESSIONCATEGORY_SOLOAMBIENTSOUND depending on whether you want to mix with other sounds (iPod) or not. FMOD will automatically switch to FMOD_IPHONE_SESSIONCATEGORY_PLAYANDRECORD when you do record start, and switch back when you do record stop.
FMOD automatically handles phone calls, it will auto stop activity when a call comes in, if you reject the call FMOD will auto resume, no action is required.
Unfortunately, my app depends on the session category PLAYANDRECORD. The rate at which FMOD can switch to and from it is too long when going form Ambient to PlayRecord.
I am happy to put the work in to handle the delegate methods and shut the FMOD engine down when the iPhone is about to go into standby, but would like some advice on how best to do so.
Ah yes, switching between categories is really quite slow, but there isn’t much we can do about it as it’s the phone OS which is taking the time. For your case you will need to do a System::close(), release all your sounds / dsps, etc then rebuild.
Once you call System::close() the mixer will stop, which essentially halts all FMOD activity.
Please login first to submit.