Hi, currently I disable all sound and pause then game if possible when the game (unreal engine) looses focus. that works totally fine so far. For audio i do this:
My problem now is that I play videos in Unreal and play localized FMOD at the same time and sync it to the video. But when the game looses focus the video keeps playing but the audio is paused. after resuming focus the audio keeps playing but async to the video.
My question is: How can I mute the whole audio without anything actually pausing and every event still starts/stops etc. I tried setting the master bus volume to 0 but if i remember correctly other problems occured because of that.
Best regards.
Apologies for the delayed response!
The code for handling suspending/resumeing the mixer on unfocusing/focusing can be found at FFMODStudioModule::HandleApplicationWillDeactivate
and FFMODStudioModule::HandleApplicationHasReactivate.
These are added to the FCoreDelegates::ApplicationWillDeactivateDelegate
and FCoreDelegates::ApplicationHasReactivatedDelegate
delegates respectively in FMODStudioModule.cpp, around line 754 depending on your FMOD for Unreal version.
If you modify this code to avoid suspending the low level system, or to avoid executing at all, your audio should stay in sync properly regardless of the master bus volume.
If this doesn’t work for you, what platform, Unreal, and FMOD versions are you using?