| @@ -424,11 +424,24 @@ void AudioDeviceSelectorComponent::comboBoxChanged (ComboBox* comboBoxThatHasCha | |||||
| if (error.isNotEmpty()) | 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); | |||||
| } | } | ||||
| } | } | ||||