mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/MetaDataEntry.cpp
branchRCL_3
changeset 21 999b2818a0eb
parent 20 0ac9a5310753
equal deleted inserted replaced
20:0ac9a5310753 21:999b2818a0eb
   107 
   107 
   108 	CleanupStack::PushL(selfObj);
   108 	CleanupStack::PushL(selfObj);
   109 
   109 
   110 	CActiveScheduler::Start();
   110 	CActiveScheduler::Start();
   111 
   111 
   112 	if (error == KErrNone)
   112 	if (selfObj->callbackErr != KErrNone)
   113 	{
   113 	{
   114 		error = selfObj->callbackErr;
   114 		error = selfObj->callbackErr;
   115 	}
   115 	}
   116 
   116 
   117 	CleanupStack::PopAndDestroy(2); // schedule, selfObj
   117 	CleanupStack::PopAndDestroy(2); // schedule, selfObj
   141 {
   141 {
   142 #ifdef _DEBUG
   142 #ifdef _DEBUG
   143     RDebug::Print (_L ("CMetaDataEntry::MoscoStateChangeEvent"));
   143     RDebug::Print (_L ("CMetaDataEntry::MoscoStateChangeEvent"));
   144 #endif
   144 #endif
   145 	TInt err = KErrNone;
   145 	TInt err = KErrNone;
   146 //	callbackErr = KErrNone;
   146 	callbackErr = aErrorCode;
   147 	RArray<TFourCC> dataTypes;
   147 	RArray<TFourCC> dataTypes;
   148 
   148 
   149 	logger->Log(_L("MoscoStateChangeEvent called, error: %d	prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState);
   149 	logger->Log(_L("MoscoStateChangeEvent called, error: %d	prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState);
   150 
   150 
   151 
   151 	
   152 
       
   153 	if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0)
   152 	if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0)
   154 	{
   153 	{
   155 		// Initialize
   154 		// Initialize
   156 		recorder->SetAudioDeviceMode(CMdaAudioRecorderUtility::ELocal);
   155 		recorder->SetAudioDeviceMode(CMdaAudioRecorderUtility::ELocal);
   157 		logger->Log(_L("Mode set"));
   156 		logger->Log(_L("Mode set"));
   267 	{
   266 	{
   268 
   267 
   269 		logger->Log(_L("before stop....-"));
   268 		logger->Log(_L("before stop....-"));
   270 		CActiveScheduler::Stop();
   269 		CActiveScheduler::Stop();
   271 	}
   270 	}
       
   271 	if (aErrorCode != KErrNone)
       
   272 	    {
       
   273         
       
   274 	    CActiveScheduler::Stop();
       
   275 	    
       
   276 	    }
       
   277 
   272 
   278 
   273 	return;
   279 	return;
   274 
   280 
   275 }
   281 }
   276 
   282