How can I play AMR from file or descriptor?
| Mon, 2005-07-18 07:52 | |
|
Hi everybody,
I have been trying to solve the problem "how to play amr". I used CMdaRecorderUtility class for this purpose. I did the following: //Constant declarations _LIT(KAmrFile,"\\system\\apps\\AudioPlayer\\sample.amr"); const TUid KMMFExControllerUID = {0x101F5022}; const TUid KMMFExDesFormatUID = {0x101FAF66}; const TUint32 KMMFFourCCCodeAMR = 0x524d4120; void OpenAmrFile() { if(iMdaAudioRecorderUtility->State()==iMdaAudioRecorderUtility->ENotReady) { iMdaAudioRecorderUtility->OpenFileL(KAmrFile,KMMFExControllerUID, KMMFExControllerUID,KMMFExDesFormatUID,KMMFFourCCCodeAMR); } } //It does not get the EOpen state, so state is not opened here which should be opened. void CAudioPlayerEngine::MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode) { //So I can not use any checking condition PlayL(); } void PlayL() { // Play through the device speaker iMdaAudioRecorderUtility->SetAudioDeviceMode(CMdaAudioRecorderUtility::ELocal); // Set maximum volume for playback iMdaAudioRecorderUtility->SetVolume(iMdaAudioRecorderUtility->MaxVolume()); // Set the playback position to the start of the file iMdaAudioRecorderUtility->SetPosition(TTimeIntervalMicroSeconds(0)); // iMdaAudioRecorderUtility->PlayL(); } //** I get error message "Feature not supported" for PlayL() iMdaAudioRecorderUtility->PlayL(); I would really appreciate, if anybody comments on this. |
|






Forum posts: 142
yucca
Forum posts: 29
it's not as easy as you mentioned. is there any example project you know for AMR conversion,
what i tried so far(by looking at the posts on newlc forum) is:
- CAmrToPcmDecoder
- CMMFCodec
- CMdaAudioConvertUtility
none of them worked.
i finally gave up!
any example project, useful link, any code will be appreciated
Forum posts: 142
yucca