From 2c49a250a51cf0afcfee62c2ab18ee17ac0ff0cf Mon Sep 17 00:00:00 2001 From: Kot <1192090+koteq@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:08:15 +0000 Subject: [PATCH] Maybe re-init will do the trick --- Source/IconMenu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/IconMenu.cpp b/Source/IconMenu.cpp index 648a33b..0be6282 100644 --- a/Source/IconMenu.cpp +++ b/Source/IconMenu.cpp @@ -222,8 +222,11 @@ void IconMenu::changeListenerCallback(ChangeBroadcaster* changed) else if (changed == &deviceManager) { // JUCE handles output device changes, but fails to do the same for input devices, e.g. when mic gets reconnected - deviceManager.closeAudioDevice(); - deviceManager.restartLastAudioDevice(); + if (auto state = deviceManager.createStateXml()) + { + deviceManager.initialise(256, 256, state.get(), true); + } + dumpDeviceInfo(); } }