Distinguish between builtin speakers / external mic


#1

With headphones connected, Alt+clicking the speaker icon in OSX gives “headphones” as an output device option. Remove the headphones, and Alt+click the speaker icon and the output device switches to “internal speakers”. In comparison, JUCE’s AudioDeviveSelectorComponent does not make this distinction, only showing “built-in” device types. Is there any way to register a callback for these audio routing changes using JUCE? I’m guessing that the change notification would be similar to iOS devices when headphones are connected/disconnected. Covering both platforms with a common interface would be amazing.

I primarily need this feature in order to halt audio processing when headphones are removed, among other uses.