# HG changeset patch # User Tapani Kanerva # Date 1289909485 -7200 # Node ID b35006be8823029ba8f71d992ecbcaa564020d0c # Parent af86cc8a4692a58199e8e3abb410abcbd2ef7f67 Bug 3673 - Seeking via grabbing the Music Player progress bar does not work. diff -r af86cc8a4692 -r b35006be8823 mmlibs/mmfw/src/server/BaseClasses/mmfdatapath2.cpp --- a/mmlibs/mmfw/src/server/BaseClasses/mmfdatapath2.cpp Wed Oct 13 16:15:10 2010 +0300 +++ b/mmlibs/mmfw/src/server/BaseClasses/mmfdatapath2.cpp Tue Nov 16 14:11:25 2010 +0200 @@ -547,7 +547,10 @@ if(iGetTimePlayedSupported) { TTimeIntervalMicroSeconds timePlayed(0); - if(iState == EPlaying && iDataSink->DataSinkType() == KUidMmfAudioOutput) + if(iState == EPlaying + || (iState == EPrimed && iPauseCalled) + && iDataSink->DataSinkType() == KUidMmfAudioOutput ) + { CMMFAudioOutput* audioOutput = STATIC_CAST(CMMFAudioOutput*,iDataSink); CMMFDevSound& devSound = audioOutput->SoundDevice(); @@ -724,16 +727,22 @@ #ifdef _DP_DEBUG RDebug::Print(_L("DP::CalculateAudioOutputDuration from %d\n"),iReferenceAudioSamplesPlayed); #endif - CMMFAudioOutput* audioOutput = STATIC_CAST(CMMFAudioOutput*,iDataSink); CMMFDevSound& devSound = audioOutput->SoundDevice(); - + TTimeIntervalMicroSeconds devSoundTimePlayed(0); TInt64 timePlayed(0); TInt err = KErrNone; if(iGetTimePlayedSupported) { - err= devSound.GetTimePlayed(devSoundTimePlayed); + if(iDataSource->DataSourceType() == KUidMmfFormatDecode) + { + devSoundTimePlayed = ((CMMFFormatDecode*)iDataSource)->PositionL(); + } + else + { + err= devSound.GetTimePlayed(devSoundTimePlayed); + } if(err == KErrNone) { timePlayed = devSoundTimePlayed.Int64()-iDevSoundRepositionTime.Int64();