79 Q_ASSERT_X(index == AudioOutputDeviceID, Q_FUNC_INFO, |
79 Q_ASSERT_X(index == AudioOutputDeviceID, Q_FUNC_INFO, |
80 "We only support one output device, with id 0"); |
80 "We only support one output device, with id 0"); |
81 return true; |
81 return true; |
82 } |
82 } |
83 |
83 |
84 bool MMF::AudioOutput::activateOnMediaObject(MediaObject *mo) |
84 void MMF::AudioOutput::connectMediaObject(MediaObject *mediaObject) |
85 { |
85 { |
86 // Ensure that the MediaObject has the correct initial volume |
86 // Ensure that the MediaObject has the correct initial volume |
87 mo->volumeChanged(m_volume); |
87 mediaObject->volumeChanged(m_volume); |
88 // Connect MediaObject to receive future volume changes |
88 // Connect MediaObject to receive future volume changes |
89 connect(this, SIGNAL(volumeChanged(qreal)), mo, SLOT(volumeChanged(qreal))); |
89 connect(this, SIGNAL(volumeChanged(qreal)), mediaObject, SLOT(volumeChanged(qreal))); |
90 return true; |
90 } |
|
91 |
|
92 void MMF::AudioOutput::disconnectMediaObject(MediaObject *mediaObject) |
|
93 { |
|
94 // Disconnect all signal-slot connections |
|
95 disconnect(this, 0, mediaObject, 0); |
91 } |
96 } |
92 |
97 |
93 QHash<QByteArray, QVariant> MMF::AudioOutput::audioOutputDescription(int index) |
98 QHash<QByteArray, QVariant> MMF::AudioOutput::audioOutputDescription(int index) |
94 { |
99 { |
95 QHash<QByteArray, QVariant> retval; |
100 QHash<QByteArray, QVariant> retval; |