# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272375659 -10800 # Node ID a2fdc35b8f46a7a774085aafc6b02cb2551316dc # Parent bb90e4148332b939fed79babf2bd07c3144e1c21 Revision: 201015 Kit: 201017 diff -r bb90e4148332 -r a2fdc35b8f46 voicerecorder/RecViewSrc/CVRMdaRecorder.cpp --- a/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp Wed Apr 14 16:00:13 2010 +0300 +++ b/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp Tue Apr 27 16:40:59 2010 +0300 @@ -233,7 +233,20 @@ } } - StopAndNotify(); + if(iMediaServerError == KErrInUse && aPreviousState == CMdaAudioClipUtility::EPlaying) + { + CVRRecViewModel* iViewModel = NULL; + iViewModel = dynamic_cast (iAutoStopObserver); + if(iViewModel != NULL) + { + iViewModel->HandleCommandL(ECmdPause); + } + return; + } + else + { + StopAndNotify(); + } } //it will happen when the openfile fails @@ -982,7 +995,6 @@ EPanicNotAttached ) ); iPause = ETrue; - iPosition = iAudioRecorder->Position(); #ifdef _DEBUG RDebug::Print( _L("VoiceRecorder: Pause called. Position: %d:%d"), @@ -1288,16 +1300,11 @@ // void CVRMdaRecorder::SyncAndNotify() { - if (iPause) + if(!iPause) { - iMemo->SetPosition( iPosition ); + iPosition = iAudioRecorder->Position(); } - // Not sure if iPosition value is valid other than when paused, so do as - // previous for all other states: - else - { - iMemo->SetPosition( iAudioRecorder->Position() ); - } + iMemo->SetPosition( iPosition ); iMemo->SetDuration( iAudioRecorder->Duration() );