38 const TInt CSimpleSoundPlayer::KplayerActionSetBalance = 19; |
38 const TInt CSimpleSoundPlayer::KplayerActionSetBalance = 19; |
39 const TInt CSimpleSoundPlayer::KplayerActionSetPriority = 20; |
39 const TInt CSimpleSoundPlayer::KplayerActionSetPriority = 20; |
40 const TInt CSimpleSoundPlayer::KplayerActionSetRepeats = 21; |
40 const TInt CSimpleSoundPlayer::KplayerActionSetRepeats = 21; |
41 const TInt CSimpleSoundPlayer::KPlayerActionGetMetaDataEntry = 22; |
41 const TInt CSimpleSoundPlayer::KPlayerActionGetMetaDataEntry = 22; |
42 const TInt CSimpleSoundPlayer::KPlayerActionGetNumberOfMetaDataEntries = 23; |
42 const TInt CSimpleSoundPlayer::KPlayerActionGetNumberOfMetaDataEntries = 23; |
|
43 const TInt CSimpleSoundPlayer::KPlayerActionCustomCommand = 24; |
43 |
44 |
44 |
45 |
45 CSimpleSoundPlayer::CSimpleSoundPlayer(CTestModuleIf &aConsole, CStifLogger &aLogger, TBool aImmediate, TBool aFileType) |
46 CSimpleSoundPlayer::CSimpleSoundPlayer(CTestModuleIf &aConsole, CStifLogger &aLogger, TBool aImmediate, TBool aFileType) |
46 : iConsole(aConsole) , iImmediate(aImmediate) , iLogger(aLogger) , iSoundOpen(EFalse), |
47 : iConsole(aConsole) , iImmediate(aImmediate) , iLogger(aLogger) , iSoundOpen(EFalse), |
47 iFinalError(KErrNone), iFileType(aFileType) |
48 iFinalError(KErrNone), iFileType(aFileType) |
764 TInt percentageProgress; |
765 TInt percentageProgress; |
765 GetAudioLoadingProgressL(percentageProgress); |
766 GetAudioLoadingProgressL(percentageProgress); |
766 return ETrue; |
767 return ETrue; |
767 //break; |
768 //break; |
768 case KplayerActionRegisterForAudioLoadingNotification: |
769 case KplayerActionRegisterForAudioLoadingNotification: |
769 // MAudioLoadingObserver &aLoadingObserver=0; |
770 |
770 // RegisterForAudioLoadingNotification(aLoadingObserver); |
771 RegisterForAudioLoadingNotification(*this); |
771 return ETrue; |
772 return ETrue; |
772 //break; |
773 //break; |
773 case KplayerActionControllerImplementationInformation: |
774 case KplayerActionControllerImplementationInformation: |
774 ControllerImplementationInformationL(); |
775 ControllerImplementationInformationL(); |
775 return ETrue; |
776 return ETrue; |
797 break; |
798 break; |
798 |
799 |
799 case KPlayerActionOpenFileHandler: |
800 case KPlayerActionOpenFileHandler: |
800 OpenFileHandlerL((static_cast<CFileNameParameters*>(aParams) )->GetFileName() , ETrue); |
801 OpenFileHandlerL((static_cast<CFileNameParameters*>(aParams) )->GetFileName() , ETrue); |
801 break; |
802 break; |
|
803 case KPlayerActionCustomCommand: |
|
804 CustomCommand(); |
802 } |
805 } |
803 if (iIsLoopPlayEnabled) |
806 if (iIsLoopPlayEnabled) |
804 return ETrue; |
807 return ETrue; |
805 else |
808 else |
806 return EFalse; |
809 return EFalse; |
807 } |
810 } |
|
811 |
|
812 |
|
813 void CSimpleSoundPlayer::MaloLoadingStarted() |
|
814 { |
|
815 iLogger.Log(_L("CSimpleSoundPlayer::MaloLoadingStarted")); |
|
816 } |
|
817 void CSimpleSoundPlayer::MaloLoadingComplete() |
|
818 { |
|
819 iLogger.Log(_L("CSimpleSoundPlayer::MaloLoadingComplete")); |
|
820 } |
|
821 |
|
822 void CSimpleSoundPlayer::CustomCommand() |
|
823 { |
|
824 TBuf8<25> dataFrom; |
|
825 |
|
826 TRequestStatus status; |
|
827 TMMFMessageDestinationPckg dummyPckg; |
|
828 TInt dummyFunc = 100; |
|
829 TBuf8<8> dummyBuff; |
|
830 iMdaPlayer->CustomCommandSync(dummyPckg,dummyFunc,dummyBuff,dummyBuff); |
|
831 iMdaPlayer->CustomCommandSync(dummyPckg,dummyFunc,dummyBuff,dummyBuff,dataFrom); |
|
832 |
|
833 iMdaPlayer->CustomCommandAsync(dummyPckg,dummyFunc,dummyBuff,dummyBuff,status); |
|
834 User::WaitForRequest(status); |
|
835 |
|
836 iMdaPlayer->CustomCommandAsync(dummyPckg,dummyFunc,dummyBuff,dummyBuff,dataFrom,status); |
|
837 |
|
838 User::WaitForRequest(status); |
|
839 |
|
840 |
|
841 } |