mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
This commit is contained in:
parent
ad0f73dad6
commit
876c9a0f3a
1 changed files with 18 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue