You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phonon/phonon-4.3.80-pulseaudio-de...

44 lines
1.7 KiB

diff -ur phonon-4.3.80/phonon/globalconfig.cpp phonon-4.3.80-pulseaudio-device-priorities/phonon/globalconfig.cpp
--- phonon-4.3.80/phonon/globalconfig.cpp 2009-12-03 20:29:35.000000000 +0100
+++ phonon-4.3.80-pulseaudio-device-priorities/phonon/globalconfig.cpp 2010-01-22 15:57:25.000000000 +0100
@@ -33,6 +33,7 @@
#include "pulsesupport_p.h"
#include <QtCore/QList>
+#include <QtCore/QHash>
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
@@ -314,6 +315,15 @@
| ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0)
);
}
+ // make PulseAudio the global default (assume it is already default in this list)
+ if (!list.isEmpty()) {
+ int firstIndex = list.first();
+ if (backendIface->objectDescriptionProperties(Phonon::AudioOutputDeviceType,
+ firstIndex)["icon"].toString() == "audio-backend-pulseaudio") {
+ list.removeFirst();
+ defaultList.prepend(firstIndex);
+ }
+ }
defaultList += list;
}
@@ -394,6 +404,15 @@
| ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0)
);
}
+ // make PulseAudio the global default (assume it is already default in this list)
+ if (!list.isEmpty()) {
+ int firstIndex = list.first();
+ if (backendIface->objectDescriptionProperties(Phonon::AudioCaptureDeviceType,
+ firstIndex)["icon"].toString() == "audio-backend-pulseaudio") {
+ list.removeFirst();
+ defaultList.prepend(firstIndex);
+ }
+ }
defaultList += list;
}