1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

CoreAudio: Return the correct index when the list of devices change

This commit is contained in:
Anthony Nicholls 2023-09-13 16:54:22 +01:00
parent 27fad0f975
commit 3540152d71
2 changed files with 11 additions and 14 deletions

View file

@ -227,6 +227,8 @@ public:
type.scanForDevices();
setup.manager->addChangeListener (this);
updateAllControls();
}
~AudioDeviceSettingsPanel() override
@ -1154,10 +1156,8 @@ void AudioDeviceSelectorComponent::updateAllControls()
details.maxNumOutputChannels = maxOutputChannels;
details.useStereoPairs = showChannelsAsStereoPairs;
auto sp = std::make_unique<AudioDeviceSettingsPanel> (*type, details, hideAdvancedOptionsWithButton);
addAndMakeVisible (*sp);
sp->updateAllControls();
audioDeviceSettingsComp = std::move (sp);
audioDeviceSettingsComp = std::make_unique<AudioDeviceSettingsPanel> (*type, details, hideAdvancedOptionsWithButton);
addAndMakeVisible (audioDeviceSettingsComp.get());
}
}