AudioDeviceManager changeListenerCallback not firing in Release on device remove/add


Hey fellow JUCE devs. I’ve been enjoying using JUCE so far, but have a minor issue that’s turned up. I’d love to hear if I’m doing something obviously wrong before I dig too deeply into this issue.

I am using JUCE as a static library with the following modules:

  • juce_audio_basics
  • juce_audio_devices
  • juce_audio_formats
  • juce_core
  • juce_events

I am using juce::AudioDeviceManager as a member of my own DeviceManager class, and as such my own class inherits from juce::ChangeListener and implements:
void changeListenerCallback(ChangeBroadcaster* source);

My class is added as a change listener to the instance of juce::AudioDeviceManager.

Running on macOS in Debug it works! When I plug in a USB device I get this stack (as expected):

However, in Release build the changeListenerCallback function is not called! Is this to do with my use of JUCE as a static library? Has anyone else seen anything like this?

I’m using JUCE 5.3.2 on macOS.


I am also struggling with this issue.