Unplugging a Monitor Creates Error (API)

We are using FMOD Studio API in our game for school and when you unplug a monitor it creates this error when running FMOD’s Update function:

“A Win32 COM related error occurred. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly.”

Currently my only guess is switching a sound source creates this issue. For example if using an HDMI cord and unplugging it would then cause the source to switch. However, when testing with a VGA cord this doesn’t happen.

Any ideas on how to fix this or possibly detect when a source switches and handle it accordingly.

Thanks in advance.

Using FMOD Studio Version 1.05.04

What version of FMOD Studio are you using?

FMOD Studio 1.05.04

Sorry, I meant to ask which version of the API are you using?

FMOD Studio API for C++ downloaded with the same version we are using for FMOD Studio so 1.05.04. (I’m not using Low Level of fsbank if that’s what you mean?

That error message corresponds to FMOD_ERR_COM, which was removed in 1.05.00. Can you make sure all the libs, DLLs and headers are from the 1.05.04.

1 Like

That fixed it. I guess we were updating FMOD Studio but hadn’t been updating the API as well. Thanks.

Try messing around with sytem->getRecordNumDrivers, getDriver, getDriverInfo.

I use getRecordNumDrivers to detect the number of recording devices plugged in.

This sounds like a bug we fixed back in 1.04.08.

1 Like