Permanently re-enable audio selection on Windows

This commit is contained in:
David Rowe 2015-02-02 11:19:11 -08:00
parent 2eeb2a5ec5
commit 6e82679997

View file

@ -134,23 +134,13 @@ void Audio::audioMixerKilled() {
QAudioDeviceInfo getNamedAudioDeviceForMode(QAudio::Mode mode, const QString& deviceName) {
QAudioDeviceInfo result;
// Temporarily enable audio device selection in Windows again to test how it behaves now
//#ifdef WIN32
#if FALSE
// NOTE
// this is a workaround for a windows only QtBug https://bugreports.qt-project.org/browse/QTBUG-16117
// static QAudioDeviceInfo objects get deallocated when QList<QAudioDevieInfo> objects go out of scope
result = (mode == QAudio::AudioInput) ?
QAudioDeviceInfo::defaultInputDevice() :
QAudioDeviceInfo::defaultOutputDevice();
#else
foreach(QAudioDeviceInfo audioDevice, QAudioDeviceInfo::availableDevices(mode)) {
if (audioDevice.deviceName().trimmed() == deviceName.trimmed()) {
result = audioDevice;
break;
}
}
#endif
return result;
}