[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/phonon/phonon
From:       Colin Guthrie <kde () colin ! guthr ! ie>
Date:       2010-01-30 11:47:21
Message-ID: 1264852041.764508.765.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1082383 by cguthrie:

phonon: Ensure the backend object exists before we use GlobalConfig().

As the backends now explicitly enable PA support on initialisation
we cannot use GlobalConfig() until our backend is initialised.

While this is a rather annoying prerequisit, it doesn't seem to
cause any problem in the kdebase-runtime code which also
uses GlobalConfig().

While this raises some doubt in my mind about how well this
all holds together I think that defaulting to not supporting
PA in the backend allows for safer development of backends
where unexpected PA integration in phonon itself is not triggered
unless the backend specifically says to do so.

 M  +1 -3      audiooutput.cpp  


--- trunk/kdesupport/phonon/phonon/audiooutput.cpp #1082382:1082383
@@ -101,9 +101,6 @@
     streamUuid = QUuid::createUuid().toString();
     PulseSupport::getInstance()->setStreamPropList(category, streamUuid);
 
-    // select hardware device according to the category
-    device = AudioOutputDevice::fromIndex(GlobalConfig().audioOutputDeviceFor(category, \
                GlobalConfig::AdvancedDevicesFromSettings | \
                GlobalConfig::HideUnavailableDevices));
-
     createBackendObject();
 
     q->connect(Factory::sender(), SIGNAL(availableAudioOutputDevicesChanged()), \
SLOT(_k_deviceListChanged())); @@ -120,6 +117,7 @@
         return;
     Q_Q(AudioOutput);
     m_backendObject = Factory::createAudioOutput(q);
+    device = AudioOutputDevice::fromIndex(GlobalConfig().audioOutputDeviceFor(category, \
GlobalConfig::AdvancedDevicesFromSettings | GlobalConfig::HideUnavailableDevices));  \
if (m_backendObject) {  setupBackendObject();
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic