# Multiple systems callback

**URL:** https://qa.fmod.com/t/multiple-systems-callback/15123
**Category:** FMOD Engine
**Created:** [October 10, 2019, 2:08pm UTC](https://qa.fmod.com/t/multiple-systems-callback/15123 "2019-10-10T14:08:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![gunnerq](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@gunnerq](https://qa.fmod.com/u/gunnerq)
#### Post date: [October 10, 2019, 2:08pm UTC](https://qa.fmod.com/t/multiple-systems-callback/15123/1 "2019-10-10T14:08:24Z")

</div>

I am using 2 low level system instances to control sound output to different output devices.

I setCallback for each system to control device list change.

But I get callback only from one of system being updated firstly.

After device list change only one of two systems has updated device list (which got callback). Second system did not get callback and has old device list.

The order of normal and buggy system depends on order of system-\>update call.

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [October 15, 2019, 3:09am UTC](https://qa.fmod.com/t/multiple-systems-callback/15123/2 "2019-10-15T03:09:07Z")

</div>

Are you checking the FMOD\_RESULT returned from all the FMOD functions?

Enabling logging by using the FMOD logging libraries may also provide more useful information.

---

<div class="post-metadata">

### Author: ![gunnerq](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@gunnerq](https://qa.fmod.com/u/gunnerq)
#### Post date: [October 15, 2019, 9:37am UTC](https://qa.fmod.com/t/multiple-systems-callback/15123/3 "2019-10-15T09:37:44Z")

</div>

Hi, Cameron.

I’ve found mistake in FMOD source code and fixed FMOD code myself. There is a really problem with system’s device list update. Please forward my topic question to programmers and ask them if they need my FMOD fix.

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [October 16, 2019, 4:37am UTC](https://qa.fmod.com/t/multiple-systems-callback/15123/4 "2019-10-16T04:37:00Z")

</div>

What is the mistake you have found?

---

<div class="post-metadata">

### Author: ![gunnerq](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@gunnerq](https://qa.fmod.com/u/gunnerq)
#### Post date: [October 16, 2019, 5:44am UTC](https://qa.fmod.com/t/multiple-systems-callback/15123/5 "2019-10-16T05:44:03Z")

</div>

There is a static class property keeping last count of drivers. If project has several low-level systems, update of first system changes this property. So updates of next systems compare new value of this field with new number of drivers and do not update its list of drivers.  
Solution: make this property non-static and keep last number of drivers for each system to have possibility to update each system’s driver list change separately.

I’d prefer not to paste code here due to NDA. So ask me via email if you need commit details.

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [October 16, 2019, 10:18pm UTC](https://qa.fmod.com/t/multiple-systems-callback/15123/6 "2019-10-16T22:18:45Z")

</div>

Thanks for the information, we are already planning to rework that implementation to support default device changes so we’ll fix that at the same time.
