mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioResourceNotification.cpp
branchRCL_3
changeset 21 999b2818a0eb
parent 20 0ac9a5310753
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioResourceNotification.cpp	Wed Sep 01 12:23:00 2010 +0100
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioResourceNotification.cpp	Tue Sep 14 22:21:33 2010 +0300
@@ -28,6 +28,7 @@
 {
 	console = aConsole;
 	logger = aLogger;
+	iCallBackErr = KErrNone;
 
 }
 
@@ -107,7 +108,10 @@
 	CleanupStack::PushL(selfObj);
 
 	CActiveScheduler::Start();
-
+	if(selfObj->iCallBackErr != KErrNone)
+	    {
+        error = selfObj->iCallBackErr;
+        }
 
 	CleanupStack::PopAndDestroy(2); // schedule, selfObj
 
@@ -141,7 +145,7 @@
 
 	logger->Log(_L("MoscoStateChangeEvent called, error: %d	prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState);
 
-
+	iCallBackErr = aErrorCode;	
 
 	if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0)
 	{
@@ -205,9 +209,15 @@
 
 		recorder->WillResumePlay();
 		CActiveScheduler::Stop();
+		return;
 	}
-
-	return;
+	if (aErrorCode != KErrNone)
+	        {
+	        
+	        CActiveScheduler::Stop();
+	        return;
+	        }
+	
 
 }
 
@@ -222,7 +232,7 @@
 }
 
 
-void CAudioResourceNotification::MarncResourceAvailable(TUid aNotificationEventId, const TDesC8 &aNotificationData)
+void CAudioResourceNotification::MarncResourceAvailable(TUid /*aNotificationEventId*/, const TDesC8 &/*aNotificationData*/)
 {
 		logger->Log(_L("MarncResourceAvailable "));
 }