mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp Thu Aug 19 10:26:11 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp Tue Aug 31 15:43:02 2010 +0300
@@ -106,8 +106,10 @@
CleanupStack::PushL(selfObj);
CActiveScheduler::Start();
-
-
+
+ if(selfObj->iCallbackErr != KErrNone)
+ error = selfObj->iCallbackErr;
+
CleanupStack::PopAndDestroy(2); // schedule, selfObj
return error;
@@ -136,10 +138,12 @@
#ifdef _DEBUG
RDebug::Print (_L ("CThreadPriority::MoscoStateChangeEvent"));
#endif
- TInt err = KErrNone;
+
logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState);
logger->Log(_L("Before Checking Duaration."));
+iCallbackErr = aErrorCode;
+
TTimeIntervalMicroSeconds aDuration, aRecordTime;
TMMFDurationInfo clipDuration = recorder->Duration(aDuration);
logger->Log(_L("Duaration is %d"), aDuration.Int64());
@@ -191,10 +195,17 @@
CActiveScheduler::Stop();
+ return;
}
+ if (aErrorCode != KErrNone)
+ {
+
+ CActiveScheduler::Stop();
+ return ;
+ }
- return;
+
}