You changed the audio output mode of FMOD Studio only. Not unity.
When you selected ASIO it takes over the windows audio system, ie with exclusive audio control.
When you then ran unity (with WASAPI output as shown in the error messages) it failed because ASIO is holding control of the windows audio.
The best idea would be to alter the FMOD startup sequence in unity, and not adjust the FMOD Studio audio output mode.
During development you cannot have a WASAPI and ASIO application (or 2 ASIO applications) running simultaneously
Thanks for your answer Brett.
Could you please give me an example of how to do that in Unity script? or at least the commands I need to use for that? I only found the C++ examples in the documentation but I did not manage to find the classes and methods to select the output type to ASIO from unity.
You could probably download the FMOD Unity integration, it has all the scripts used to set up fmod, and you could copy bits out of it if you are doing your own integration.
If anybody comes across this post, here are some snippets to do this. I modified RuntimeManager.cs for this:
string sOutputType = pt.Settings.Config.GetString("Audio/OutputType", "AUTODETECT");
try
{
outputType = (FMOD.OUTPUTTYPE)Enum.Parse(typeof(FMOD.OUTPUTTYPE), sOutputType);
Debug.Log($"FMOD Initialize: Audio/OutputType setting is '{outputType}'");
}
catch (Exception e)
{
Debug.LogWarning($"Could not parse 'Audio/OutputType' enum of '{sOutputType}'; valid values are AUTODETECT, ASIO, WASAPI etc ({e.Message})");
}
...
result = FMOD.Studio.System.create(out studioSystem);
CheckInitResult(result, "FMOD.Studio.System.create");
result = studioSystem.getCoreSystem(out coreSystem);
CheckInitResult(result, "FMOD.Studio.System.getCoreSystem");
// Set desired OutputType BEFORE selecting a driver
// This works better for ASIO for example (and e.g. Dante Virtual Soundcard)
// since those are not detected with OutputType set to AUTODETECT
result = coreSystem.setOutput(outputType);
CheckInitResult(result, "FMOD.System.setOutput");