diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2009-12-18 00:56:28 (GMT) |
---|---|---|
committer | Kurt Korbatits <kurt.korbatits@nokia.com> | 2009-12-18 00:56:28 (GMT) |
commit | 7e22fc06165e6eb4ca74e228a9677905e12b1454 (patch) | |
tree | ae908ed162fee35909c22b1c3b2afcb76bd2d388 /src/multimedia | |
parent | cce709287279a8dd5ac17ed4c9dd09ebb78c4f27 (diff) | |
download | Qt-7e22fc06165e6eb4ca74e228a9677905e12b1454.zip Qt-7e22fc06165e6eb4ca74e228a9677905e12b1454.tar.gz Qt-7e22fc06165e6eb4ca74e228a9677905e12b1454.tar.bz2 |
no audiodevices found using QAudioDeviceInfo::availableDevices on Ubuntu
Task-number:QTBUG-6866
Reviewed-by:Justin McPherson
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp index 9645fa8..f58f5be 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp @@ -403,6 +403,7 @@ void QAudioDeviceInfoInternal::updateLists() QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) { + QList<QByteArray> allDevices; QList<QByteArray> devices; QByteArray filter; @@ -430,6 +431,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) if((name != NULL) && (descr != NULL) && ((io == NULL) || (io == filter))) { QString deviceName = QLatin1String(name); QString deviceDescription = QLatin1String(descr); + allDevices.append(deviceName.toLocal8Bit().constData()); if(deviceDescription.contains(QLatin1String("Default Audio Device"))) devices.append(deviceName.toLocal8Bit().constData()); } @@ -457,6 +459,9 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) if (idx > 0) devices.append("default"); #endif + if (devices.size() == 0 && allDevices.size() > 0) + return allDevices; + return devices; } |