FMOD keeps throwing error while running test on AWS server

Hello, I’m having trouble in our CI/CD unit test flow. I think I understand the problem but need help solving it:

During Unity’s Playmode Unit tests, the editor is run on an AWS server.

(I’m guessing because the server doesn’t have a sound driver, so) in playmode test FMOD keeps throwing an exception like this:

<![CDATA[ Unhandled log message: '[Error] [FMOD] OutputWASAPI::enumerate : IMMDeviceEnumerator::GetDefaultAudioEndpoint returned 0x800706BA. '. Use UnityEngine.TestTools.LogAssert.Expect ]]>

Since it’s an unexpected exception log, our test cases fail.

I have tried to disable FMOD logging during test runs with:

public IEnumerator TestSetUp()
    FMODUnity.Settings.Instance.LoggingLevel = DEBUG_FLAGS.NONE;

But even then, FMOD still throws another exception instead:

<![CDATA[ Unhandled log message: '[Exception] SystemNotInitializedException: [FMOD] Initialization failed : Output forced to NO SOUND mode : ERR_OUTPUT_INIT : Error initializing output device.'. Use UnityEngine.TestTools.LogAssert.Expect ]]>

Since it’s an CI/CD test runner we don’t care about sound. I’m looking for a way to either:

  • Really completely disable all exception log from FMOD, or
  • Manage to find a way to mock FMOD (so it’s not initialized during test runs)

But have yet to find a way to do neither.

Please suggest what I should do :pray:

TIL you can install sound driver on an AWS server.

Problem fixed.