mmaudio_pub/drm_audio_player_api/tsrc/DRMAudioPlay/src/DRMAudioPlay_core.cpp
changeset 2 5c1df44f2eed
parent 0 b8ed18f6c07b
child 5 b220a9341636
equal deleted inserted replaced
1:fcaf4606ba4e 2:5c1df44f2eed
   653 		iLogger->Log(_L("Perceived duration: %d") , PerceivedDuration.Int64() );
   653 		iLogger->Log(_L("Perceived duration: %d") , PerceivedDuration.Int64() );
   654 
   654 
   655 
   655 
   656 		TTimeIntervalMicroSeconds ExpectedDuration = TTimeIntervalMicroSeconds(I64INT(sndPlayer->GetDuration().Int64()) - I64INT(Position.Int64()));
   656 		TTimeIntervalMicroSeconds ExpectedDuration = TTimeIntervalMicroSeconds(I64INT(sndPlayer->GetDuration().Int64()) - I64INT(Position.Int64()));
   657 		iLogger->Log(_L("ExpectedDuration: %d") ,ExpectedDuration.Int64() );
   657 		iLogger->Log(_L("ExpectedDuration: %d") ,ExpectedDuration.Int64() );
       
   658 		
       
   659 		//if total duration less than the setposition value, set the expected duration to zero
       
   660 		//to handle test cases with setposition >   total duration.
       
   661 		if(ExpectedDuration.Int64() < 0)
       
   662 		    ExpectedDuration = TTimeIntervalMicroSeconds(I64INT(0));
   658 
   663 
   659 		if (  Abs(ExpectedDuration.Int64() - PerceivedDuration.Int64()) > ErrorRange.Int64() )
   664 		if (  Abs(ExpectedDuration.Int64() - PerceivedDuration.Int64()) > ErrorRange.Int64() )
   660 			{	//Durations too different
   665 			{	//Durations too different
   661 			iLogger->Log(_L("The clips duration is too different from the actual duration + position") );
   666 			iLogger->Log(_L("The clips duration is too different from the actual duration + position") );
   662 			aResult.iResult = KErrExpectedValueDifferent;
   667 			aResult.iResult = KErrExpectedValueDifferent;