diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-12 10:22:28 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-12 10:22:28 (GMT) |
commit | 3b768dee3e01c2eb5fb7915a6ea6f1cabb7052aa (patch) | |
tree | 8a8ad9db4921919996a592592ffa0029a589f4cc | |
parent | 773512d205df2ba7caa28b7b5cdbfbd6787a0967 (diff) | |
parent | baf8eabd2c647d6ba2bf0a9dc5103f4726808c3d (diff) | |
download | Qt-3b768dee3e01c2eb5fb7915a6ea6f1cabb7052aa.zip Qt-3b768dee3e01c2eb5fb7915a6ea6f1cabb7052aa.tar.gz Qt-3b768dee3e01c2eb5fb7915a6ea6f1cabb7052aa.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging:
QAudioOutput(ALSA); Fix check for available devices.
Phonon; Update CMakeLists.txt
-rw-r--r-- | src/3rdparty/phonon/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp | 31 |
2 files changed, 18 insertions, 15 deletions
diff --git a/src/3rdparty/phonon/CMakeLists.txt b/src/3rdparty/phonon/CMakeLists.txt index e2054d3..fd6368c 100644 --- a/src/3rdparty/phonon/CMakeLists.txt +++ b/src/3rdparty/phonon/CMakeLists.txt @@ -94,7 +94,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) set( __KDE_HAVE_GCC_VISIBILITY ${__KDE_HAVE_GCC_VISIBILITY} CACHE BOOL "GCC support for hidden visibility") # get the gcc version - exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info) + exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} --version OUTPUT_VARIABLE _gcc_version_info) string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the patch level, handle this here: diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp index f663dd2..633b309 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp @@ -431,21 +431,24 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) while (*n != NULL) { name = snd_device_name_get_hint(*n, "NAME"); - descr = snd_device_name_get_hint(*n, "DESC"); - io = snd_device_name_get_hint(*n, "IOID"); - 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()); - } - if(name != NULL) + if (name != 0 && qstrcmp(name, "null") != 0) { + descr = snd_device_name_get_hint(*n, "DESC"); + io = snd_device_name_get_hint(*n, "IOID"); + + if ((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()); + } + free(name); - if(descr != NULL) - free(descr); - if(io != NULL) - free(io); + if (descr != NULL) + free(descr); + if (io != NULL) + free(io); + } ++n; } snd_device_name_free_hint(hints); |