FMOD Studio interruption on iOS (library bug?)

Hello FMODists,

I’ve implemented an iOS app using FMOD Studio and ran into a glitch with restarting an event instance after an incoming call interruption. I set the audio session category and interruption callback like this:

        [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
        [[AVAudioSession sharedInstance] setDelegate:self];

And the handlers simply do:

- (void)pause
        FMOD_Studio_EventInstance_SetPaused(_currentEventInstance, TRUE);

- (void)resume
            FMOD_Studio_EventInstance_SetPaused(_currentEventInstance, FALSE);

The audio pauses but it it won’t resume. I double checked and update timer is still running so I’m stumped.

So I tried the API in the Studio Examples and it shows the same behavior.

I suspect it’s a library bug.

In your interruption handler try using FMOD::System::mixerSuspend and FMOD::System::mixerResume, this will completely tear down and rebuild the audio interface while preserving the state of all your objects.

1 Like