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.
52 lines
1.8 KiB
52 lines
1.8 KiB
--- trunk/kdesupport/phonon/xine/audiooutput.cpp 2009/12/27 16:57:19 1066664
|
|
+++ trunk/kdesupport/phonon/xine/audiooutput.cpp 2010/01/21 20:13:50 1078226
|
|
@@ -26,6 +26,7 @@
|
|
#include <sys/ioctl.h>
|
|
#include <iostream>
|
|
#include <QSet>
|
|
+#include <phonon/pulsesupport_p.h>
|
|
#include "mediaobject.h"
|
|
#include "backend.h"
|
|
#include "events.h"
|
|
@@ -48,10 +49,6 @@
|
|
AudioOutput::AudioOutput(QObject *parent)
|
|
: AbstractAudioOutput(new AudioOutputXT, parent)
|
|
{
|
|
- // Always initialise the "device" in use.
|
|
- // This is needed for PulseAudio support as subsequent calls to setOutputDevice()
|
|
- // are suppressed
|
|
- setOutputDevice(0);
|
|
}
|
|
|
|
AudioOutput::~AudioOutput()
|
|
@@ -132,6 +129,17 @@
|
|
{
|
|
K_XT(AudioOutput);
|
|
xine_audio_port_t *port = 0;
|
|
+
|
|
+ PulseSupport *pulse = PulseSupport::getInstance();
|
|
+ if (pulse->isActive()) {
|
|
+ // Here we trust that the PA plugin is setup correctly and we just want to use it.
|
|
+ const QByteArray &outputPlugin = "pulseaudio";
|
|
+ debug() << Q_FUNC_INFO << "PA Active: use output plugin:" << outputPlugin;
|
|
+ port = xine_open_audio_driver(xt->m_xine, outputPlugin.constData(), 0);
|
|
+ debug() << Q_FUNC_INFO << "----------------------------------------------- audio_port created";
|
|
+ return port;
|
|
+ }
|
|
+
|
|
if (!deviceDesc.isValid()) {
|
|
// use null output for invalid devices
|
|
port = xine_open_audio_driver(xt->m_xine, "none", 0);
|
|
--- trunk/kdesupport/phonon/xine/backend.cpp 2009/12/27 16:57:19 1066664
|
|
+++ trunk/kdesupport/phonon/xine/backend.cpp 2010/01/21 20:13:50 1078226
|
|
@@ -588,9 +588,6 @@
|
|
|
|
QByteArray Backend::audioDriverFor(int audioDevice)
|
|
{
|
|
- if (PulseSupport::getInstance()->isActive())
|
|
- return "pulseaudio";
|
|
-
|
|
instance()->checkAudioOutputs();
|
|
const Backend *const that = instance();
|
|
for (int i = 0; i < that->m_audioOutputInfos.size(); ++i) {
|