summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2009-09-08 04:10:56 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2009-09-08 04:10:56 (GMT)
commitb74d10c45c3ff21c2d87871aebf0869d45b0f555 (patch)
tree4972f36dff7a454b8efbd1aa9497d9a92a06b9f6 /src
parent2ed2632acec45ce4979ce21a0fe93d286a16613c (diff)
downloadQt-b74d10c45c3ff21c2d87871aebf0869d45b0f555.zip
Qt-b74d10c45c3ff21c2d87871aebf0869d45b0f555.tar.gz
Qt-b74d10c45c3ff21c2d87871aebf0869d45b0f555.tar.bz2
QAudioDeviceInfo::deviceList() wasn't working correctly if no audio
device. The default was being added even when no audio devices were available. Change so that the default device is only added if there is at least one audio device. Reviewed-by:Bill King
Diffstat (limited to 'src')
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index d8d974f..5de5c27 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -341,8 +341,6 @@ QList<QByteArray> QAudioDeviceInfoPrivate::deviceList(QAudio::Mode mode)
QList<QByteArray> devices;
- devices.append("default");
-
if(mode == QAudio::AudioOutput) {
WAVEOUTCAPS woc;
unsigned long iNumDevs,i;
@@ -365,6 +363,9 @@ QList<QByteArray> QAudioDeviceInfoPrivate::deviceList(QAudio::Mode mode)
}
}
+ if(devices.count() > 0)
+ devices.append("default");
+
return devices;
}