CMMFRecordTest Class Reference

List of all members.

Public Member Functions

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

Static Public Member Functions

static CMMFRecordTestNewLC ()

Detailed Description

This class implements a state machine that records a short clip using each format that the system supports. For each record format that the system supports, it will record 2s of audio to a file, then 2s of audio into a descriptor. It will then move onto the next format.

It is necessary to implement this as a state machine as we get asynchronous callbacks via MoscoStateChangeEvent which we have to wait for before we can continue to the next step.

For each record format, we go through these states in order: 1. EInitFile - while the file recording is initialised 2. (after the MoscoStateChangeEvent callback) ERecordFile - on a 2s timer while recording takes place 3. EDoOpenDesc - while recording into a descriptor is initialised 4. (after the MoscoStateChangeEvent callback) ERecordDesc - again on a 2s timer.

The logic implemented here is probably somewhat more complex that would be necessary for any normal recording, but it demonstrates the principal of how to use the recording API.

Definition at line 41 of file mmfrec.h.


Member Function Documentation

void CMMFRecordTest::MoscoStateChangeEvent ( CBase *  aObject,
TInt  aPreviousState,
TInt  aCurrentState,
TInt  aErrorCode 
) [virtual]

This is called by the recorder utility whenever some event occurs relating to the recording. For example, it is called after initialisation when the utility is ready to begin recording. It would be called again if there was a problem during recording that meant it had to be terminated.

Definition at line 102 of file mmfrec.cpp.


Generated by  doxygen 1.6.2