You Are Here:

Community: Wiki

This page was last modified on 24 June 2007, at 07:36.

Audio Recording APIs

From Forum Nokia Wiki

The MMF (Multimedia Framework) provides a consolidated API for both simple audio playback and recording operations. The library used for audio recording is the same as the one used for audio playback; however, the classes used are different. For audio recording, the classes are:

--CMdaAudioRecorderUtility — The audio recorder API supporting audio file manipulation and recording operations in MMF.

--CMdaAudioPlayerUtility — The audio player API that supports audio playback operations and simple metadata retrieval operations.

--MMdaObjectStateChangeObserver — The callback API for the CMdaAudioRecorderUtility class that reports errors and state-change events during record and playback operations.

These classes are found in the MediaClientAudio.lib library.

Note that CMdaAudioPlayerUtility is also listed as a class used for audio recording operations, however its use is optional. The CMdaAudioRecorderUtility class has limited audio playback functionality, so where functions such as setting the volume ramp or metadata retrieval are required, CMdaAudioPlayerUtility will need to be used.

The CMdaAudioRecorderUtility class inherits the same set of basic audio operations, such as PlayL(), Stop(), and OpenFile(), as supported in the CMdaAudioPlayerUtility class, but with the addition of methods for audio clip manipulations, such as Crop() and Record().

Similarly to audio playback, when implementing with the CMdaAudioRecorderUtility class it is necessary to inherit and derive the abstract observer class, which consists of a single method:

void MoscoStateChangeEvent(CBase* aObject, 
TInt aPreviousState,
TInt aCurrentState,
TInt aErrorCode);

This callback function will be invoked whenever there is a state change in the CMdaAudioRecorderUtility instance created.

Steps involved in Record Operation:

//Create an instance of CMdaAudioRecorderUtility class
CMdaAudioRecorderUtility iRecorder = CMdaAudioRecorderUtility::NewL(*this);
 
//Open file either by using a filename with full path infor or a descriptor
iRecorder->OpenFileL( aFilename );
//iRecorder->OpenDesL( aDescriptor );
 
//Recording is started
iRecorder->RecordL();
....
....
//Stop Recording
iRecorder->Stop();
//Close the recording session
iRecorder->Close();


Note: During creation of the CMdaAudioRecorderUtility class instance, the priority and preferences for the instance can be set. These arguments are optional and the default values are EMdaPriorityNormal and EMdaPriorityPreferenceTimeAndQuality. It is strongly recommended to use higher priority than the default. Priority of 80 (100 is maximum) is usable for recording.

It should be noted that the standard MMF functions do not allow recording to be undertaken during a phone call.


Links

Playing audio files

Audio Playback APIs

Audio playing, recording and conversion overview

Audio and Video Documents


--

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fE25E455E25BE44E2595E25E455E2588E25B6E25E459E259FE25B3E25E459E25A2E2591E25E456E2596E2587E25E454E25BBE25B6X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZaudioQ qfnZtopicQUqfnTopicZmultimediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ