Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
876c9a0f3a
1 changed files with 18 additions and 5 deletions
  1. +18
    -5
      src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp

+ 18
- 5
src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp View File

@@ -424,11 +424,24 @@ void AudioDeviceSelectorComponent::comboBoxChanged (ComboBox* comboBoxThatHasCha
if (error.isNotEmpty())
{
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Error while opening \"")
+ audioDeviceDropDown->getText()
+ T("\""),
error);
#if JUCE_WIN32
if (deviceManager.getInputChannels().countNumberOfSetBits() > 0
&& deviceManager.getOutputChannels().countNumberOfSetBits() > 0)
{
// in DSound, some machines lose their primary input device when a mic
// is removed, and this also buggers up our attempt at opening an output
// device, so this is a workaround that doesn't fail in that case.
BitArray noInputs;
error = deviceManager.setAudioDevice (audioDeviceDropDown->getText(),
0, 0, &noInputs, 0, false);
}
#endif
if (error.isNotEmpty())
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Error while opening \"")
+ audioDeviceDropDown->getText()
+ T("\""),
error);
}
}


Loading…
Cancel
Save