mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordFormats.cpp
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordFormats.cpp Wed Sep 01 12:23:00 2010 +0100
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordFormats.cpp Tue Sep 14 22:21:33 2010 +0300
@@ -29,6 +29,7 @@
{
console = aConsole;
logger = aLogger;
+ iCallBackErr = KErrNone;
}
CRecordFormats::~CRecordFormats()
@@ -81,7 +82,8 @@
#endif
logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState);
-
+ iCallBackErr = aErrorCode;
+
if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen)
{
TRAPD(err3, recorder->AudioRecorderControllerImplementationInformationL());
@@ -106,6 +108,7 @@
TInt CRecordFormats::RunTestL(CTestModuleIf* aConsole, CStifLogger *aLogger, CStifSectionParser* aParser, TInt* /*clipCounter*/)
{
+ TInt error = KErrNone;
aLogger->Log(_L("Creating scheduler"));
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler;
@@ -136,8 +139,11 @@
CActiveScheduler::Start();
CleanupStack::PopAndDestroy(2);
-
- return KErrNone;
+
+ if(selfObj->iCallBackErr != KErrNone)
+ error = selfObj->iCallBackErr;
+
+ return error;
}