Multiple systems callback

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.

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.

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.

What is the mistake you have found?

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.

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.