# System.SetDriver Error

**URL:** <https://qa.fmod.com/t/system-setdriver-error/22095>\
**Category:** Unity\
**Created:** [September 16, 2024, 9:20am UTC](https://qa.fmod.com/t/system-setdriver-error/22095 "2024-09-16T09:20:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spootymilk](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@spootymilk](https://qa.fmod.com/u/spootymilk)\
**Post date:** [September 16, 2024, 9:20am UTC](https://qa.fmod.com/t/system-setdriver-error/22095/1 "2024-09-16T09:20:31Z")

</div>

Hi,

We were using FMOD 2.02.09 and we have a lot of users that has an error when calling System.SetDriver. It cause the soundcard to be in error, and they need to unplugged, plug it back to make it work again.

I see in your Detailed Revision History for version 2.02.10 :

- Core API - Fixed potential [FMOD\_ERR\_INVALID\_PARAM](https://www.fmod.com/docs/2.03/api/core-api-common.html#fmod_err_invalid_param) from [System::setDriver](https://www.fmod.com/docs/2.03/api/core-api-system.html#system_setdriver) if the device list has changed since a previous call to that function.

I upgrade to version 2.02.23 (the last one) and the error still occurs.

In the previous version of our software that include FMOD 2.01.05, the error was not present it seams. (Not sure about that)

Some details about our software :  
Windows Only (10 and 11), OutputType WASAPI Only  
At the start, it launch a software that makes the device list to changed  
we suscribe to IMMNotificationClient::OnDeviceStateChange and other Windows notification to handle the device list change and make FMOD update device when this happen.  
We do not use FMOD\_SYSTEM\_CALLBACK\_DEVICELISTCHANGED because it is to slow for our needs.

---

<div class="post-metadata">

**Author:** ![spootymilk](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@spootymilk](https://qa.fmod.com/u/spootymilk)\
**Post date:** [September 16, 2024, 9:21pm UTC](https://qa.fmod.com/t/system-setdriver-error/22095/2 "2024-09-16T21:21:16Z")

</div>

Another issue we are encountering is that some of our users experience a complete disconnection of their USB and Bluetooth devices. (Not just audio devices).

At first, we thought it was isolated and related to the user’s computer, but it seems not. This can happen with an Intel I9 14900k as well as a 9th generation I3.  
Our software needs to call System.setDriver quite intensively. Maybe this problem is not related to the issue of my previous message, but I wanted to bring it to your attention.  
Since I don’t know exactly what FMOD does when this function is called, maybe this can guide your research.

Thank you in advance for your help.

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [September 22, 2024, 11:39pm UTC](https://qa.fmod.com/t/system-setdriver-error/22095/3 "2024-09-22T23:39:07Z")

</div>

Hi,

Thank you for sharing the information.

Unfortunately, I was not able to reproduce the issue you mentioned from my end.

Could I please grab some more information?

Are there any logs you can share?

Could you please tick API Error logging and set the Logging Level to “Log” ([Unity Integration | 8. Settings | 8.2 Initialization | 8.2.1 Logging Level](https://fmod.com/docs/2.02/unity/settings.html#logging-level)) to see if you can get more error logs from the console?

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXf1gt5gTjDdg3tR-Us7QH3b_0BC5M6PEkF_YduzlNyACucO3lIK3YYqFjIfU2kdUBYb9W4TpI1B_VD34LUeEQKefaO2Gmv9-sSXv8vD-IaT1NQpX3tFCSlsoeZBJTqpC6Q_Uh7tljGgXhca0VwHcRCu7c4x?key=fsQWfGgbj_shEInlMLlerQ)

Would it be possible to get a code snippet around the `System::setDriver()` function?

> [@spootymilk](#):
>
> We do not use FMOD\_SYSTEM\_CALLBACK\_DEVICELISTCHANGED because it is to slow for our needs.

Could you please elaborate on this issue?

> [@spootymilk](#):
>
> Our software needs to call System.setDriver quite intensively.

Could you elaborate on this as well please?

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [September 26, 2024, 6:05am UTC](https://qa.fmod.com/t/system-setdriver-error/22095/6 "2024-09-26T06:05:19Z")

</div>

Thank you for sharing the code and logs.

An Issue I could see is the Windows event triggering before the FMOD system has had a chance to update its driver list causing the invalid param, however, I still have not been able to reproduce the issue.

> [@spootymilk](#):
>
> There is 5 FMOD System that runs at the same time. We change the audio output during the use of the software. When this happen, we use SetDriver to do it on each FMOD.System

Would it be possible to elaborate the consideration of using 5 FMOD systems? Could you please describe the use case?

Thank you for the information.
