From 92ed8a1a049f60733ce15c4a5b79ed0fc389cfcd Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 14 Apr 2010 20:04:39 +0100 Subject: Phonon MMF: ensure initial volume is applied A recent change meant that, if the user set a volume level before loading a clip into the MediaObject, that initial volume level was not applied to the audio output. Reviewed-by: Frans Englich --- src/3rdparty/phonon/mmf/abstractmediaplayer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp index 7104ebd..be2a568 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp @@ -494,15 +494,14 @@ void MMF::AbstractMediaPlayer::changeState(PrivateState newState) const Phonon::State newPhononState = phononState(newState); if (LoadingState == oldPhononState && StoppedState == newPhononState) { - // Ensure initial volume is set on MMF API before starting playback - doVolumeChanged(); - switch (m_pending) { case NothingPending: AbstractPlayer::changeState(newState); break; case PlayPending: + changeState(PlayingState); // necessary in order to apply initial volume + doVolumeChanged(); startPlayback(); break; -- cgit v0.12