mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp
branchRCL_3
changeset 50 999b2818a0eb
parent 46 0ac9a5310753
equal deleted inserted replaced
46:0ac9a5310753 50:999b2818a0eb
   104 
   104 
   105 
   105 
   106 	CleanupStack::PushL(selfObj);
   106 	CleanupStack::PushL(selfObj);
   107 
   107 
   108 	CActiveScheduler::Start();
   108 	CActiveScheduler::Start();
   109 
   109 	
   110 
   110 	if(selfObj->iCallbackErr != KErrNone)
       
   111 	    error = selfObj->iCallbackErr;
       
   112 	
   111 	CleanupStack::PopAndDestroy(2); // schedule, selfObj
   113 	CleanupStack::PopAndDestroy(2); // schedule, selfObj
   112 
   114 
   113 	return error;
   115 	return error;
   114 }
   116 }
   115 
   117 
   134 void CThreadPriority::MoscoStateChangeEvent(CBase* /*aObject*/, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)
   136 void CThreadPriority::MoscoStateChangeEvent(CBase* /*aObject*/, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)
   135 {
   137 {
   136 #ifdef _DEBUG
   138 #ifdef _DEBUG
   137     RDebug::Print (_L ("CThreadPriority::MoscoStateChangeEvent"));
   139     RDebug::Print (_L ("CThreadPriority::MoscoStateChangeEvent"));
   138 #endif
   140 #endif
   139 	TInt err = KErrNone;
   141 	
   140 
   142 
   141 	logger->Log(_L("MoscoStateChangeEvent called, error: %d	prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState);
   143 	logger->Log(_L("MoscoStateChangeEvent called, error: %d	prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState);
   142 logger->Log(_L("Before Checking Duaration."));
   144 logger->Log(_L("Before Checking Duaration."));
       
   145 iCallbackErr = aErrorCode;
       
   146     
   143 		TTimeIntervalMicroSeconds aDuration, aRecordTime;
   147 		TTimeIntervalMicroSeconds aDuration, aRecordTime;
   144   	    TMMFDurationInfo clipDuration = recorder->Duration(aDuration);
   148   	    TMMFDurationInfo clipDuration = recorder->Duration(aDuration);
   145 		logger->Log(_L("Duaration is %d"), aDuration.Int64());
   149 		logger->Log(_L("Duaration is %d"), aDuration.Int64());
   146 
   150 
   147 
   151 
   189 		//aRecordTime= recorder->RecordTimeAvailable();
   193 		//aRecordTime= recorder->RecordTimeAvailable();
   190  	    //logger->Log(_L("RecordTimeAvailable %d"), aRecordTime);
   194  	    //logger->Log(_L("RecordTimeAvailable %d"), aRecordTime);
   191 
   195 
   192 
   196 
   193 		CActiveScheduler::Stop();
   197 		CActiveScheduler::Stop();
   194 	}
   198 		return;
   195 
   199 	}
   196 
   200 	 if (aErrorCode != KErrNone)
   197 	return;
   201         {
       
   202         
       
   203         CActiveScheduler::Stop();
       
   204         return ;
       
   205         }
       
   206 
       
   207 
       
   208 
   198 
   209 
   199 }
   210 }
   200 
   211 
   201 
   212 
   202 
   213