CMdaAudioRecorderUtility problems
Hi,
In Nokia 6630, Today we use CMdaAudioRecorderUtility to record the data and it only allows to record in file. It does not allow to record in buffer, which means
OpenDesL() does not work, only OpenFileL() works. But the same API was working in 6600. Is there a way to open the recorder in buffer mode?
Also,
In this file based recording, When we issue RecordL() on the recorder it comes back with a callback on MoscoStateChangeEvent from Open state to Recording state. The delay between the time when it called the
callback and the time when data is available in the file is nearly around 2 seconds. This introduces
lot of voice delay. Is this the expected behavior of the API?
thanks
Suresh.
Its unavoidable hardware constraint
HI suresh
This delay is the behavior of hardware to get realised.
When you open a file for recording , the reorder take some time to go to EOpen state . Best solution is to display a text message on screen like "Preparing herdware" just after issueing OpenL command on recorder and as you get EOpen state in MoscoStateChangeEvent() function , you issue record command and after some time the recorder goes into ERecording state as notified in the MoscoStateChangeEvent() function and then display a message like "Recording started" ,
otherwise you can't avoid this delay.
Hope this information may be helpful to you.
Cheers
Navjot Singh
Re: CMdaAudioRecorderUtility problems
Hi Friends,
I need some clarification regarding my recording utility. I am developing a utility which records a greeting message. And i will be waiting for an incomming call...when a call comes i need to play my recorded greeting, after that a beep and then start recording callers voice and stop after a min or when the caller hooks...
Now can u tell me how to play, beep, record..How to wait untill the playing of greeting, beep and then start rec???
can some one help me in this...i am a new bee...
And can u tell tell how to hide the app after activating the auto answer mode and pull the app when a call comes...
--Raju
Re: CMdaAudioRecorderUtility problems
Go through following steps :
1) You need to use telephony features i.e. ETel APIs and create a .exe that always runs in background
listening/monitoring inconming calls . RLine class provided methods like NotifyIncomingCall(),
GetCallInfo() etc. On detecting incoming call , u need to execute a some ETel commands to pick up
the phone i.e. invoking function Connect() on a RCall object .
2) on connecting the call , u need to create an object of class
i.e.
CMdaAudioRecorderUtility iRecorder = CMdaAudioRecorderUtility::NewL();
//@ pass your parameters to NewL()
iRecorder->SetAudioDeviceMode(ETelephonyMixed);
iRecorder->OpenFileL(path_of_ur_file_to_be_played);
iState=EOpeningPlayTone;
before this note that u must create an enumeration for the state engine of application
i.e.
//@ declare this enumeration in the header file
enum AppState
{
EOpenedPlayTone,
EPlayedPlayTone,
EOpenedBeepTone,
EPlayedBeepTone,
EOpenedFileForRecording,
ERecordedMessage,
EIdle
};
create class member AppState iState;
3) Note: your class whose member is iRecorder must implement the interface/Mixin observer
MMdaObjectStateChangeObserver and the class must implement the method
virtual void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt
aErrorCode) = 0;
4) when the opening of file path_of_ur_file_to_be_played is completed the control goes to method
MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)
{
switch(iState)
{
case EOpenedPlayTone:
iState=EPlayedPlayTone;
iRecorder->PlayL();
break;
case EPlayedPlayTone :
//@ control comes here when the playing of tone ends
iRecorder->Close();//@ release the file
iState=EOpenedBeepTone;
iRecorder->OpenFileL(beep_tone_file_path);
break;
case EOpenedBeepTone:
//@ control comes here when opening of beep tone file completes
iState = EPlayedBeedTone;
iRecorder->Play();
break;
case EPlayedBeedTone;
//@ control comes here when the playing of beep tone ends
iRecorder->Close();//@ release the file
iState=EOpenedFileForRecording;
iRecorder->OpenFileL(recording_file_path);
break;
case EOpenedFileForRecording :
//@ contol comes here when recorder has openened the file for recording
//@ start recording now and start a CPeriodic or RTimer with one minute elapse as u wish
iRecorder->Record();
/*
i recommend u to use CPeriodic that calls up after one minute(your defined time period) and the
callback must return '0' if u do not want the callback function to be executed after every one
minute.
so in callback function u must call 'iRecorder->Stop() and then iRecorder->Close()'
otherwise u need to check if phone call has been disconnected and then call iRecorder->Stop() and
the iRecorder->Close();
*/
break;
}
}
I hope this information will help you .
Cheers
kanda
Re: CMdaAudioRecorderUtility problems
Hi Kanda,
thank you very much for your detailed reply...
Is there any great diff b/n the Recorder app's (provided by the nokia) RegisterLine() implementation with NotifyIncomingCall() and GetCallInfo()??? It(RegisterLine) doesnt implement any of your mentioned methods...
If you can, please give me some infr about making an app as a exe???
--Raju
Re: CMdaAudioRecorderUtility problems
[QUOTE=stenlik]Hi,
some os versions have problems with recording into buffer, but it works when recording into file:
AMR-encoded audio cannot be recorded to a descriptor on Series 60 Platform 2nd Edition, Feature Pack 1 devices (such as Nokia 7610 and Nokia 6260) using the CMdaAudioRecorderUtility::OpenDesL() method.
On N6630 is should be solved...
Bye
STeN[/QUOTE]
I've done this on the 7610. You need to step up the codec for the descriptor with these values.
const TUid KMMFExControllerUID = {0x101F5022};
const TUid KMMFExDesFormatUID = {0x101FAF66};
iMdaAudioRecorderUtility->OpenDesL(<descriptor>,KMMFExControllerUID,KMMFExControllerUID,KMMFExDesFormatUID,KMMFFourCCCodeAMR);