getAvailableDevices() does not detect real-time device list changes

I have a JUCE app the will change the mode of the midi device from normal mode to bootloader mode. The app is able to change the sate of the device from normal mode to bootloader mode, and MacOS and Audio Midi Setup is able to detect the state change. However, at runtime, when getAvailableDevices() is invoked again, it still detects the device in normal mode and not in bootloader mode. I have to restart the app again inorder for it to detect that the device is in bootloader mode via getAvailableDevices().

Are you able to step through and debug? I’ve had a quick glance at the code and it looks like every time MidiInput::getAvailableDevices() or MidiOutput::getAvailableDevices() is called the list is rebuilt so whatever issue you’re facing it isn’t immediately obvious to me what might be causing it. How are you determining which mode a device is in?

Thanks for responding @anthony-nicholls, I gladly it!

Yes, I’ve step through the debug. So, MacOS Audio Midi Setup is able to detect the state change in just a second or two. While for MacOS device manager, you need to manually refresh it. Even so, refreshing the device list in MacOS’ System Information does not refresh the information which juce::MidiInput::getAvailableDevices() or juce::MidiOutput::getAvailableDevices() is getting.

What’s strange is that, it works perfectly fine in Windows but not in MacOS. I’m on Venture 13.2.1 by the way.