Answered
0
0

I cannot reproduce this exception on our test devices, but we frequently have the following exceptions sent to Unity performance reports service:
SystemNotInitializedException: FMOD Studio initialization failed : Calling initialize : ERR_OUTPUT_INIT : Error initializing output device.

Occurring on all versions of iOS and devices, with FMOD 1.09.06

Any idea why it couldn’t initialize the output device ?

  • You must to post comments
Best Answer
0
0

Normally this is caused by a conflict between Unity’s inbuilt audio and the FMOD integration. This can be avoided by disabling the Unity inbuilt audio, steps can be found here:
https://fmod.com/resources/documentation-api?page=content/generated/engine_new_unity/troubleshooting.html#/

  • Cameron Baron

    Previously if the system failed to init, every time you tried to access it you would get an exception, making it hard to determine the cause.
    In the latest versions, 1.09.08 & 1.10.00, we changed it to throw the exception once and then set the system to no sound mode. This is not a fix, just nicer.

    I’m not sure what the fix would be without seeing more information on the specific error as there could be a number of causes. The couple I mentioned above are just the most common, and are out of our control to ‘fix’.

  • Shannon Greenwood

    Will there be logs in addition to this error that will help diagnose? How can I gather more information about what is happening?

  • Shannon Greenwood

    Will there be logs in addition to this error that will help diagnose? How can I gather more information about what is happening?

  • Cameron Baron

    You can add extra flags to the FMOD Debug init in the RuntimeManager.cs, to look like this:

    FMOD.Debug.Initialize(FMOD.DEBUG_FLAGS.LOG | FMOD.DEBUG_FLAGS.TYPE_TRACE, FMOD.DEBUG_MODE.FILE, null, RuntimeUtils.LogFileName);

    This should provide more information about the errors. If you could provide the log files, either here or to support@fmod.com, we can take a look for you.

  • Shannon Greenwood

    changed the code by commenting out #define

    got this error
    03:47:19 [Exception] SystemNotInitializedException: FMOD Studio initialization failed : Applying debug settings : ERR_UNSUPPORTED : A command issued was not supported by this object. Possibly a plugin without certain callbacks specified. FMODUnity.RuntimeManager.CheckInitResult (RESULT result, System.String cause)
    FMODUnity.RuntimeManager.Initialiase (Boolean forceNoNetwork)
    FMODUnity.RuntimeManager.get_Instance ()
    FMODUnity.RuntimeManager.LoadBank (System.String bankName, Boolean loadSamples)
    FMODUnity.StudioBankLoader.Load ()
    FMODUnity.StudioBankLoader.HandleGameEvent (LoaderGameEvent gameEvent)
    FMODUnity.StudioBankLoader.Start ()

    Is this supported on IOS at all?
    (since I had to comment out the define)

    Do I need to set the DEVELOPMENT_BUILD #define?

    //#if UNITY_EDITOR || ((UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX) && DEVELOPMENT_BUILD)
    result = FMOD.Debug.Initialize(FMOD.DEBUG_FLAGS.LOG | FMOD.DEBUG_FLAGS.TYPE_TRACE, FMOD.DEBUG_MODE.FILE, null, RuntimeUtils.LogFileName);
    if (result == FMOD.RESULT.ERR_FILE_NOTFOUND)
    {
    #if UNITY_5_X
    Debug.LogErrorFormat(“FMOD Studio: Cannot open FMOD debug log file ‘{0}’, logs will be missing for this session.”, System.IO.Path.Combine(Application.dataPath, RuntimeUtils.LogFileName));
    #else
    Debug.LogError(string.Format(“FMOD Studio: Cannot open FMOD debug log file ‘{0}’, logs will be missing for this session.”, System.IO.Path.Combine(Application.dataPath, RuntimeUtils.LogFileName)));
    #endif
    }
    else
    {
    CheckInitResult(result, “Applying debug settings”);
    }
    //#endif

0
0

Any progress on this so far?
I’m also getting this error from Unity performance reporting:
FMOD Studio initialization failed : Calling initialize : ERR_OUTPUT_INIT : Error initializing output device.

Disabling unity audio has the problem that all other audio sources are muted. It is not possible (as of my knowledge) to set the audio session yourself before showing the splash screen:
https://www.fmod.org/questions/question/mute-audio-sources-option-ignored-when-disabling-unity-audio/#sabai-entity-content-46782

  • Cameron Baron

    We are currently looking into this and will hopefully have a solution soon.

  • Cameron Baron

    In FMOD Studio version 1.09.07 we limited the number of exceptions thrown from this issue by re-initializing in no sound mode. This is by no means a fix for the cause of the exception but it does stop the error spam.

    We currently have a solution planned for a future release, although it does require reworking some of the LowLevel init system for iOS, unfortunately we don’t have a time frame for this at the moment.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.