Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/phonon/gstreamer/audiooutput.cpp

    r561 r846  
    126126{
    127127    m_backend->logMessage(Q_FUNC_INFO + QString::number(newDevice), Backend::Info, this);
     128
    128129    if (newDevice == m_device)
    129130        return true;
     
    136137
    137138    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) {
    148140        // Save previous state
    149141        GstState oldState = GST_STATE(m_audioSink);
    150142        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);
    152144        m_device = newDevice;
    153145
     
    171163        }
    172164
    173         // Note the stopped state should not really be neccessary, but seems to be required to
     165        // Note the stopped state should not really be necessary, but seems to be required to
    174166        // properly reset after changing the audio state
    175167        if (root()) {
Note: See TracChangeset for help on using the changeset viewer.