After initialising FMOD and calling [[UIApplication sharedApplication] beginReceivingRemoteControlEvents], my app responds to the system transport controls (double-press home button, swipe left to right). However, the play/pause transport control always shows a pause image, no matter in what state (play/pause/stop/no stream at all) FMOD playback is.
In case this might help you: the FMOD system is initialised with FMOD_IPHONE_SESSIONCATEGORY_MEDIAPLAYBACK.
I’m using version 4.33.01 (dev), the stable release (4.32.01) does not support transport controls somehow.
- joris asked 8 years ago
As mentioned previously in this thread, the fact that transport controls indicate that audio is always playing matches the fact that FMOD is always mixing audio to the output device, even silence. If you absolutely must halt playback, you will need to call System::close to shutdown our mixer.
FMOD is always "playing" even if you aren’t playing any sounds (it mixes silence to the output) so perhaps this explains why it always says pause?
I have not tested FMOD with transport controls enabled so this is simply an educated guess at the moment. If you shutdown FMOD I would expect it doesn’t display paused anymore?
OK, that explains a lot.
As soon as I call system::init the transport controls (with pause button) are linked to my app and a play image (triangle) appears in the status bar, both indicating that FMOD is already playing some sound. When I call system::release, the status bar image disappears and the transport controls are unlinked (i.e. they are now linked to the ipod app again).
There is no way to update the state of the transport controls manually, the controls are always automatically linked to some kind of output (e.g. AVAudioPlayer).
Is it possible to pause or stop the silence sound somehow, without shutting down FMOD?
The fact the FMOD always plays a ‘sound’ raises a second question: is it true that my app, while running in the background with no ‘real’ sound (just paused or stopped), is still draining the battery?
- joris answered 8 years ago
There is no way to pause FMOD without shutting it down, it will always be "working" (obviously at a much reduced rate) when nothing is happening.
If you you have a standard app using FMOD, and it is backgrounded, all activity halts, FMOD suspends and the app remains dormant using 0% CPU (no battery drain). However if you set your app up to allow background audio then it will continue mixing (even silence) in the background.
I have the exact same problem! The play button in the status bar stays active when I pause the sound within the app. It is very confusing.
Have there been any solution to this problem or does anyone know a workaround to it?
Thanks in advance for any help!
Please login first to submit.