Changeset 846 for trunk/src/3rdparty/phonon/gstreamer/audiooutput.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/3rdparty/phonon/gstreamer/audiooutput.cpp
r561 r846 126 126 { 127 127 m_backend->logMessage(Q_FUNC_INFO + QString::number(newDevice), Backend::Info, this); 128 128 129 if (newDevice == m_device) 129 130 return true; … … 136 137 137 138 bool success = false; 138 const QList<AudioDevice> deviceList = m_backend->deviceManager()->audioOutputDevices(); 139 int deviceIdx = -1; 140 for (int i=0; i<deviceList.size(); i++) { 141 if (deviceList.at(i).id == newDevice) { 142 deviceIdx = i; 143 break; 144 } 145 } 146 147 if (m_audioSink && deviceIdx >= 0) { 139 if (m_audioSink && newDevice >= 0) { 148 140 // Save previous state 149 141 GstState oldState = GST_STATE(m_audioSink); 150 142 const QByteArray oldDeviceValue = GstHelper::property(m_audioSink, "device"); 151 const QByteArray deviceId = deviceList.at(deviceIdx).gstId;143 const QByteArray deviceId = m_backend->deviceManager()->gstId(newDevice); 152 144 m_device = newDevice; 153 145 … … 171 163 } 172 164 173 // Note the stopped state should not really be nec cessary, but seems to be required to165 // Note the stopped state should not really be necessary, but seems to be required to 174 166 // properly reset after changing the audio state 175 167 if (root()) {
Note:
See TracChangeset
for help on using the changeset viewer.