We are having an issue with the audio where it seems to be breaking when the application is constrained. This is not happening all the time. Sadly it’s ocurring on devkits that are not ours (QA tests).
Videos can be provided to an email if needed.
FMOD version: 2.02.11
Videos would be very useful, these can also be uploaded to your profile here: https://fmod.com/profile#uploads, or emailed to firstname.lastname@example.org.
Are there any logs that you could also share? Could you elaborate on what is happening when the application is constrained?
Hi Connor. Thanks for the answer.
We are not sure what kind of logs would be helpful here.
While constrained, the game does the same as when it’s active. Haven’t checked but my guess is that FMOD’s plugin is calling FFMODStudioModule::SetSystemPaused when the constrain happens. not sure if that’s the cause.
The step to reproduce is simple (at least for XSX), we have been able to do so by just going to dev menu for 20 or more minutes. The longer we go, the easier to reproduce it (shorter times just show silence for a while and then music gets re-activated).
Video with name 61144_Reopen.mp4 has been uploaded to my profile.
Thanks for the help
Thank you for the video.
Any logs that contain FMOD Error logs would be useful, this can be enabled in the FMOD Integration settings under the Logging level
Unreal Integration | Settings - Logging Level
FMOD does not handle Unreal losing focus, would it be possible implementing a UE callback (Application lost focus event - #8 by Kokuyouseki - Programming & Scripting - Epic Developer Community Forums) and call
Sysem::MixerSuspend() (FMOD API | Core API Reference - System) when the application is no longer in focus. This may stop the FMOD system from continuing to run the background and running out of resources. You could use
ChannelControl::setPaused() as well so that no popping is heard when the mixer is suspended. Then when the application resumes focus call
ChannelControl::setPaused() if it was used to resume the audio. Let me know if that helps!
I will continue to try to reproduce the issue on my end.
We have been testing this and while it seems to fix the issue on some consoles (XSX) i’m not entirely sure if this is causing some sort of freezing on other consoles. So far i have seen the PS4 freezing (not even crashing, as no dump is generated. We are still doing more tests to know the exact reason why this is happening.
The function we end up using was IFMODStudioModule::Get().SetSystemPaused(true)/(off). Will keep you posted if we find something
Good to hear the issue was solved, it is definitely concerning that it may be causing other errors. If you can provide any more information for the freeze that would be greatly appreciated.
Debugging, on all cases, it seems that it’s freezing because of FMOD at least on PS4 (haven’t seen this on other consoles, even on switch).
When pausing the thread sometimes it shows that it always breakpoints on UFMODBlueprintStatics::PlayEventAtLocation “EventInst->set3DAttributes(&EventAttr);”. Other times it shows it’s on the ListenerUpdatePosition call.
My guess is that even tho the mixer is paused, the render is still doing it’s job and queueing data, so when the mixer is resumed it just hangs as it’s too much data to process.
Skipping the mixer pause on PS seems to fix this issue, however i don’t think this is the best path to take, as the audio might break again, as stated ont he original issue.
Pausing the audio before suspending the mixer was to avoid any popping or clicking from the speakers. Just suspending the mixer will be enough the solve the original issue.
Testing on PC, after being suspended for a while we are also getting system hang (bug it recovers after some minutes)
[2023.06.05-20.54.44:880]LogFMOD: Error: ‘ClockSinks[EFMODSystemContext::Runtime]->LastResult’ returned ‘Error trying to allocate a channel.’
This is the message we get on PC
For PC, I would recommend just using
ChannelControl::setPaused() without the
Do you know the function that is returning this error?
Just checking if there was anything else I could assist with?