summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-09-29 16:20:44 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-29 16:20:44 (GMT)
commit946b656791cef433b249ad0bebd2143a1b54c6f4 (patch)
treee01047632f83a82eae0d20b6fd984ecf92be7d4b /src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
parenta9ea6e24db0e25ec8c84c9a29356aac999421d07 (diff)
parent1cbe6b2126a10ad846167d147b4cfbf3c6d9b402 (diff)
downloadQt-946b656791cef433b249ad0bebd2143a1b54c6f4.zip
Qt-946b656791cef433b249ad0bebd2143a1b54c6f4.tar.gz
Qt-946b656791cef433b249ad0bebd2143a1b54c6f4.tar.bz2
Merge branch 'mmfphonon' of scm.dev.nokia.troll.no:qt/qt-s60-public into mmfphonon
Conflicts: src/3rdparty/phonon/mmf/abstractplayer.cpp
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractmediaplayer.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
index e8f8a67..8fe1e4d 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
@@ -41,7 +41,6 @@ const int NullMaxVolume = -1;
MMF::AbstractMediaPlayer::AbstractMediaPlayer() :
m_playPending(false)
, m_tickTimer(new QTimer(this))
- , m_volume(InitialVolume)
, m_mmfMaxVolume(NullMaxVolume)
{
connect(m_tickTimer.data(), SIGNAL(timeout()), this, SLOT(tick()));
@@ -51,7 +50,6 @@ MMF::AbstractMediaPlayer::AbstractMediaPlayer(const AbstractPlayer& player) :
AbstractPlayer(player)
, m_playPending(false)
, m_tickTimer(new QTimer(this))
- , m_volume(InitialVolume)
, m_mmfMaxVolume(NullMaxVolume)
{
connect(m_tickTimer.data(), SIGNAL(timeout()), this, SLOT(tick()));
@@ -296,7 +294,7 @@ void MMF::AbstractMediaPlayer::volumeChanged(qreal volume)
TRACE_CONTEXT(AbstractMediaPlayer::volumeChanged, EAudioInternal);
TRACE_ENTRY("state %d", privateState());
- m_volume = volume;
+ AbstractPlayer::volumeChanged(volume);
doVolumeChanged();
TRACE_EXIT_0();
@@ -373,17 +371,21 @@ void MMF::AbstractMediaPlayer::changeState(PrivateState newState)
setState(newState);
- // Check whether play() was called while clip was being loaded. If so,
- // playback should be started now
if (
- LoadingState == oldPhononState
- and StoppedState == newPhononState
- and m_playPending
- ) {
- TRACE_0("play was called while loading; starting playback now");
- m_playPending = false;
- play();
- }
+ LoadingState == oldPhononState
+ and StoppedState == newPhononState
+ ) {
+ // Ensure initial volume is set on MMF API before starting playback
+ doVolumeChanged();
+
+ // Check whether play() was called while clip was being loaded. If so,
+ // playback should be started now
+ if (m_playPending) {
+ TRACE_0("play was called while loading; starting playback now");
+ m_playPending = false;
+ play();
+ }
+ }
TRACE_EXIT_0();
}