Apologies for the delayed response.
Unfortunately, there’s not a particularly convenient way of suppressing the warning. The straightforward solution is to modify RuntimeManager.DEBUG_CALLBACK()
in .\Assets\Plugins\FMOD\src\RuntimeManager.cs
to filter out the functionOutputWASAPI::mixerThread
and message “Starvation detected in WASAPI output buffer!”. For example:
[AOT.MonoPInvokeCallback(typeof(FMOD.DEBUG_CALLBACK))]
private static FMOD.RESULT DEBUG_CALLBACK(FMOD.DEBUG_FLAGS flags, IntPtr filePtr, int line, IntPtr funcPtr, IntPtr messagePtr)
{
FMOD.StringWrapper file = new FMOD.StringWrapper(filePtr);
FMOD.StringWrapper func = new FMOD.StringWrapper(funcPtr);
FMOD.StringWrapper message = new FMOD.StringWrapper(messagePtr);
if (flags == FMOD.DEBUG_FLAGS.ERROR)
{
RuntimeUtils.DebugLogError(string.Format(("[FMOD] {0} : {1}"), (string)func, (string)message));
}
else if (flags == FMOD.DEBUG_FLAGS.WARNING)
{
// NEW CODE START
// Only log warning if it's NOT WASAPI output buffer starvation
if (((string)message) != "Starvation detected in WASAPI output buffer!\n")
{
RuntimeUtils.DebugLogWarning(string.Format(("[FMOD] {0} : {1}"), (string)func, (string)message));
}
// NEW CODE END
}
else if (flags == FMOD.DEBUG_FLAGS.LOG)
{
RuntimeUtils.DebugLog(string.Format(("[FMOD] {0} : {1}"), (string)func, (string)message));
}
return FMOD.RESULT.OK;
}
However, this will filter out legitimate occurrences, which while rarer do have happen - usually this warning would occur when the system is under too much load, and cannot fill the output buffer fast enough to output a continuous stream of audio.