mmlibs/mmfw/src/Client/Audio/mmfclienttoneplayer.cpp
branchRCL_3
changeset 50 948c7f65f6d4
parent 49 735348f59235
equal deleted inserted replaced
49:735348f59235 50:948c7f65f6d4
   858 	iAsyncCallback->MatoPrepareComplete(error);
   858 	iAsyncCallback->MatoPrepareComplete(error);
   859 	}
   859 	}
   860 
   860 
   861 void CMMFMdaAudioToneUtility::CancelPrepare()
   861 void CMMFMdaAudioToneUtility::CancelPrepare()
   862 	{
   862 	{
   863 	// xxx - do we need to cancel the callback?  What if the callback is actually calling back another error?  Probably best not to cancel...
   863 	// FIXME - do we need to cancel the callback?  What if the callback is actually calling back another error?  Probably best not to cancel...
   864 	delete iToneConfig;
   864 	delete iToneConfig;
   865 	iToneConfig = NULL;
   865 	iToneConfig = NULL;
   866 
   866 
   867 	if (iState == EMdaAudioToneUtilityPrepared)
   867 	if (iState == EMdaAudioToneUtilityPrepared)
   868 		{
   868 		{
  1035 		iState = EMdaAudioToneUtilityNotReady;
  1035 		iState = EMdaAudioToneUtilityNotReady;
  1036 		iAsyncCallback->MatoPlayComplete(error);
  1036 		iAsyncCallback->MatoPlayComplete(error);
  1037 		}
  1037 		}
  1038 	else
  1038 	else
  1039 		{
  1039 		{
  1040 		iAsyncCallback->MatoPlayStarted(KErrNone);
  1040         if(iPlayStartObserver)
       
  1041             {
       
  1042             iAsyncCallback->MatoPlayStarted(KErrNone);
       
  1043             }
  1041 		}
  1044 		}
  1042 	}
  1045 	}
  1043 	
  1046 	
  1044 void CMMFMdaAudioToneUtility::CancelPlay()
  1047 void CMMFMdaAudioToneUtility::CancelPlay()
  1045 	{
  1048 	{
  1137 	User::RequestComplete(s, KErrNone);
  1140 	User::RequestComplete(s, KErrNone);
  1138 	}
  1141 	}
  1139 
  1142 
  1140 void CMMFMdaAudioToneObserverCallback::MatoPlayComplete(TInt aError)
  1143 void CMMFMdaAudioToneObserverCallback::MatoPlayComplete(TInt aError)
  1141 	{
  1144 	{
  1142 	iAction = EPlayComplete;
  1145     if(!IsActive())
  1143 	iErrorCode = aError;
  1146         {
  1144 
  1147         iAction = EPlayComplete;
  1145 	TRequestStatus* s = &iStatus;
  1148         iErrorCode = aError;
  1146 	SetActive();
  1149         
  1147 	User::RequestComplete(s, KErrNone);
  1150         TRequestStatus* s = &iStatus;
       
  1151         SetActive();
       
  1152         User::RequestComplete(s, KErrNone);
       
  1153         }
  1148 	}
  1154 	}
  1149 
  1155 
  1150 void CMMFMdaAudioToneObserverCallback::MatoPlayStarted(TInt aError)
  1156 void CMMFMdaAudioToneObserverCallback::MatoPlayStarted(TInt aError)
  1151 	{
  1157 	{
  1152 	iAction = EPlayStarted;
  1158 	iAction = EPlayStarted;