class CMdaAudioRecorderUtility : public CMdaAudioClipUtility |
Plays back, records and edits audio sample data.
The class offers an interface to play, record and edit audio sample data. This data can be supplied either in a file or as a descriptor. The functions that start and stop playback and recording are defined in the base class CMdaAudioClipUtility.
While this class is abstract, the static NewL() function constructs, initialises and returns a pointer to an instance of a concrete class derived from this abstract class. This concrete class is part of the MMF implementation and is private.
Public Member Enumerations | |
---|---|
enum | TDeviceMode { EDefault = 0, ETelephonyOrLocal = EDefault, ETelephonyMixed = 1, ETelephonyNonMixed = 2, ELocal = 3 } |
Inherited Enumerations | |
---|---|
CMdaAudioClipUtility:TState |
Private Attributes | |
---|---|
CMMFMdaAudioRecorderUtility * | iProperties |
IMPORT_C void | AddMetaDataEntryL | ( | CMMFMetaDataEntry & | aMetaDataEntry | ) |
CMMFMetaDataEntry & aMetaDataEntry |
IMPORT_C const CMMFControllerImplementationInformation & | AudioPlayControllerImplementationInformationL | ( | ) |
IMPORT_C const CMMFControllerImplementationInformation & | AudioRecorderControllerImplementationInformationL | ( | ) |
IMPORT_C TInt | CancelRegisterAudioResourceNotification | ( | TUid | aNotificationEventId | ) |
TUid aNotificationEventId |
void | ClearPlayWindow | ( | ) | [virtual] |
Removes any window defined on the audio sample data.
All subsequent playing, position setting and position querying requests are mapped to the whole of the audio sample data.
5.0
void | CropFromBeginningL | ( | ) | [virtual] |
Deletes all audio sample data from the beginning of the audio clip. The effects of the function cannot be undone.
The function is synchronous and can leave if there is a problem. The leave code depends on the configuration.
5.0
void | CropL | ( | ) | [virtual] |
Deletes all audio sample data after the current head position. The effects of the function cannot be undone.
The function is synchronous and can leave if there is a problem. The leave code depends on the configuration.
5.0
const TTimeIntervalMicroSeconds & | Duration | ( | ) | [virtual] |
Returns the duration of the audio sample data.
5.0
IMPORT_C TMMFDurationInfo | Duration | ( | TTimeIntervalMicroSeconds & | aDuration | ) |
TTimeIntervalMicroSeconds & aDuration |
IMPORT_C void | GetAudioLoadingProgressL | ( | TInt & | aPercentageComplete | ) |
TInt & aPercentageComplete |
IMPORT_C CMMFMetaDataEntry * | GetMetaDataEntryL | ( | TInt | aMetaDataIndex | ) |
TInt aMetaDataIndex |
IMPORT_C TInt | GetNumberOfMetaDataEntries | ( | TInt & | aNumEntries | ) |
TInt & aNumEntries |
IMPORT_C TInt | GetPlaybackBalance | ( | TInt & | aBalance | ) |
TInt & aBalance |
IMPORT_C void | GetSupportedBitRatesL | ( | RArray< TUint > & | aSupportedBitRates | ) |
IMPORT_C void | GetSupportedDestinationDataTypesL | ( | RArray< TFourCC > & | aSupportedDataTypes | ) |
IMPORT_C void | GetSupportedNumberOfChannelsL | ( | RArray< TUint > & | aSupportedNumChannels | ) |
IMPORT_C void | GetSupportedSampleRatesL | ( | RArray< TUint > & | aSupportedSampleRates | ) |
IMPORT_C CMdaAudioRecorderUtility * | NewL | ( | MMdaObjectStateChangeObserver & | aObserver, |
CMdaServer * | aServer = NULL, | |||
TInt | aPriority = EMdaPriorityNormal, | |||
TInt | aPref = EMdaPriorityPreferenceTimeAndQuality | |||
) | [static] |
MMdaObjectStateChangeObserver & aObserver | |
CMdaServer * aServer = NULL | |
TInt aPriority = EMdaPriorityNormal | |
TInt aPref = EMdaPriorityPreferenceTimeAndQuality |
void | OpenDesL | ( | const TDesC8 & | aDescriptor | ) | [virtual] |
const TDesC8 & aDescriptor |
IMPORT_C void | OpenDesL | ( | TDes8 & | aDescriptor, |
TUid | aRecordControllerUid, | |||
TUid | aPlaybackControllerUid = KNullUid, | |||
TUid | aDestinationFormatUid = KNullUid, | |||
TFourCC | aDestinationDataType = KFourCCNULL | |||
) |
void | OpenFileL | ( | const TDesC & | aFileName | ) | [virtual] |
const TDesC & aFileName |
IMPORT_C void | OpenFileL | ( | const TMMSource & | aSource | ) |
const TMMSource & aSource |
IMPORT_C void | OpenFileL | ( | const TDesC & | aFileName, |
TUid | aRecordControllerUid, | |||
TUid | aPlaybackControllerUid = KNullUid, | |||
TUid | aDestinationFormatUid = KNullUid, | |||
TFourCC | aDestinationDataType = KFourCCNULL | |||
) |
IMPORT_C void | OpenFileL | ( | const RFile & | aFile, |
TUid | aRecordControllerUid, | |||
TUid | aPlaybackControllerUid = KNullUid, | |||
TUid | aDestinationFormatUid = KNullUid, | |||
TFourCC | aDestinationDataType = KFourCCNULL | |||
) |
IMPORT_C void | OpenFileL | ( | const TMMSource & | aSource, |
TUid | aRecordControllerUid, | |||
TUid | aPlaybackControllerUid = KNullUid, | |||
TUid | aDestinationFormatUid = KNullUid, | |||
TFourCC | aDestinationDataType = KFourCCNULL | |||
) |
void | OpenL | ( | TMdaClipLocation * | aLocation, |
TMdaClipFormat * | aFormat, | |||
TMdaPackage * | aArg1 = NULL, | |||
TMdaPackage * | aArg2 = NULL | |||
) | [virtual] |
TMdaClipLocation * aLocation | |
TMdaClipFormat * aFormat | |
TMdaPackage * aArg1 = NULL | |
TMdaPackage * aArg2 = NULL |
IMPORT_C void | OpenUrlL | ( | const TDesC & | aUrl, |
TInt | aIapId, | |||
TUid | aRecordControllerUid, | |||
TUid | aPlaybackControllerUid = KNullUid, | |||
TUid | aDestinationFormatUid = KNullUid, | |||
TFourCC | aDestinationDataType = KFourCCNULL | |||
) |
IMPORT_C void | OpenUrlL | ( | const TDesC & | aUrl, |
TInt | aIapId = KUseDefaultIap , | |||
const TDesC8 & | aMimeType = KNullDesC8 | |||
) |
const TDesC & aUrl | |
TInt aIapId = KUseDefaultIap | |
const TDesC8 & aMimeType = KNullDesC8 |
IMPORT_C void | PlayControllerCustomCommandAsync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2, | |||
TDes8 & | aDataFrom, | |||
TRequestStatus & | aStatus | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 | |
TDes8 & aDataFrom | |
TRequestStatus & aStatus |
IMPORT_C void | PlayControllerCustomCommandAsync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2, | |||
TRequestStatus & | aStatus | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 | |
TRequestStatus & aStatus |
IMPORT_C TInt | PlayControllerCustomCommandSync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2, | |||
TDes8 & | aDataFrom | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 | |
TDes8 & aDataFrom |
IMPORT_C TInt | PlayControllerCustomCommandSync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2 | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 |
void | PlayL | ( | ) | [virtual] |
Begins playback of audio sample data at the current playback position using the current volume, gain and priority settings.
5.0
const TTimeIntervalMicroSeconds & | Position | ( | ) | [virtual] |
Returns the current head position.
The head position is defined in terms of a time interval measured from the beginning of the audio sample data.
5.0
IMPORT_C void | RecordControllerCustomCommandAsync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2, | |||
TDes8 & | aDataFrom, | |||
TRequestStatus & | aStatus | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 | |
TDes8 & aDataFrom | |
TRequestStatus & aStatus |
IMPORT_C void | RecordControllerCustomCommandAsync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2, | |||
TRequestStatus & | aStatus | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 | |
TRequestStatus & aStatus |
IMPORT_C TInt | RecordControllerCustomCommandSync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2, | |||
TDes8 & | aDataFrom | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 | |
TDes8 & aDataFrom |
IMPORT_C TInt | RecordControllerCustomCommandSync | ( | const TMMFMessageDestinationPckg & | aDestination, |
TInt | aFunction, | |||
const TDesC8 & | aDataTo1, | |||
const TDesC8 & | aDataTo2 | |||
) |
const TMMFMessageDestinationPckg & aDestination | |
TInt aFunction | |
const TDesC8 & aDataTo1 | |
const TDesC8 & aDataTo2 |
void | RecordL | ( | ) | [virtual] |
Starts appending new audio sample data.
The new audio sample data is appended to the existing audio sample data in the same format as the existing audio sample data. If existing data is to be overwritten, then it should be cropped to the appropriate length before appending the new data.
Note, before starting to record, make sure that the gain is set by calling CMdaAudioRecorderUtility::SetGain(), as the initial gain is undefined. The gain might also have been modified by another client application.
5.0
const TTimeIntervalMicroSeconds & | RecordTimeAvailable | ( | ) | [virtual] |
Returns the recording time available for the selected file or descriptor and encoding format.
5.0
IMPORT_C TInt | RegisterAudioResourceNotification | ( | MMMFAudioResourceNotificationCallback & | aCallback, |
TUid | aNotificationEventUid, | |||
const TDesC8 & | aNotificationRegistrationData = KNullDesC8 | |||
) |
MMMFAudioResourceNotificationCallback & aCallback | |
TUid aNotificationEventUid | |
const TDesC8 & aNotificationRegistrationData = KNullDesC8 |
IMPORT_C void | RegisterForAudioLoadingNotification | ( | MAudioLoadingObserver & | aCallback | ) |
MAudioLoadingObserver & aCallback |
IMPORT_C TInt | RemoveMetaDataEntry | ( | TInt | aMetaDataIndex | ) |
TInt aMetaDataIndex |
IMPORT_C void | ReplaceMetaDataEntryL | ( | TInt | aMetaDataIndex, |
CMMFMetaDataEntry & | aMetaDataEntry | |||
) |
TInt aMetaDataIndex | |
CMMFMetaDataEntry & aMetaDataEntry |
void | SetAudioDeviceMode | ( | TDeviceMode | aMode | ) | [virtual] |
TDeviceMode aMode |
IMPORT_C void | SetDestinationBitRateL | ( | TUint | aBitRate | ) |
TUint aBitRate |
IMPORT_C void | SetDestinationDataTypeL | ( | TFourCC | aDataType | ) |
TFourCC aDataType |
IMPORT_C void | SetDestinationFormatL | ( | TUid | aFormatUid | ) |
TUid aFormatUid |
IMPORT_C void | SetDestinationNumberOfChannelsL | ( | TUint | aNumberOfChannels | ) |
TUint aNumberOfChannels |
IMPORT_C void | SetDestinationSampleRateL | ( | TUint | aSampleRate | ) |
TUint aSampleRate |
void | SetMaxWriteLength | ( | TInt | aMaxWriteLength = KMdaClipLocationMaxWriteLengthNone | ) | [virtual] |
Sets the maximum size for a file that is being recorded.
When this limit is reached, MMF stops recording and notifies the client application. Notification is caused by MMdaObjectStateChangeObserver::MoscoStateChangeEvent() with the error code KErrEof.
This function is provided so that applications such as recorders can limit the amount of file storage/memory that should be allocated.
5.0
TInt aMaxWriteLength = KMdaClipLocationMaxWriteLengthNone | The maximum file size in kilobytes. If the default value is used, there is no maximum file size. |
void | SetPlayWindow | ( | const TTimeIntervalMicroSeconds & | aStart, |
const TTimeIntervalMicroSeconds & | aEnd | |||
) | [virtual] |
Defines a window on the audio sample data.
The window is defined in terms of a start and end position. When the current playback position reaches the window end position, or Stop() is called, the current playback position is set to the window start position and playback stops.
The current playback position is not affected by a call to SetPlayWindow() unless it is outside the new playback window, in which case it is set to the window start or end position depending on which one is closer.
The window persists until ClearPlayWindow() is called. Loading new audio sample data without adjusting or clearing the window will result in playback errors if the window is outside the new data.
5.0
const TTimeIntervalMicroSeconds & aStart | The position defining the start of the window, measured in microseconds. If this value is less than zero, it is set to zero. If this value is greater than aEnd, then it is swapped with aEnd. |
const TTimeIntervalMicroSeconds & aEnd | The position defining the end of the window, measured in microseconds. If this value is greater than the value returned by Duration(), it is set to the value of Duration(). If this value is less than aStart, then it is swapped with aStart. |
IMPORT_C TInt | SetPlaybackBalance | ( | TInt | aBalance = KMMFBalanceCenter | ) |
TInt aBalance = KMMFBalanceCenter |
void | SetPosition | ( | const TTimeIntervalMicroSeconds & | aPosition | ) | [virtual] |
Sets the head position.
The playback head is moved to a position which is defined in terms of a time interval measured from the beginning of the audio sample data. A subsequent call to PlayL() starts from this new position.
5.0
const TTimeIntervalMicroSeconds & aPosition |
IMPORT_C TInt | SetRecordBalance | ( | TInt | aBalance = KMMFBalanceCenter | ) |
TInt aBalance = KMMFBalanceCenter |
void | SetRepeats | ( | TInt | aRepeatNumberOfTimes, |
const TTimeIntervalMicroSeconds & | aTrailingSilence | |||
) | [virtual] |
Sets the number of times the audio sample is to be repeated during the PlayL() operation.
A period of silence can follow each playing of the audio sample. The audio sample can be repeated indefinitely or until stopped.
5.0
TInt aRepeatNumberOfTimes | The number of times the audio sample, together with the trailing silence, is to be repeated. If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, is repeated indefinitely. If this is set to zero, then the audio sample is not repeated. |
const TTimeIntervalMicroSeconds & aTrailingSilence | The length of the trailing silence in microseconds. |
IMPORT_C TInt | SetThreadPriorityPlayback | ( | const TThreadPriority & | aThreadPriority | ) | const |
const TThreadPriority & aThreadPriority |
IMPORT_C TInt | SetThreadPriorityRecord | ( | const TThreadPriority & | aThreadPriority | ) | const |
const TThreadPriority & aThreadPriority |
void | SetVolumeRamp | ( | const TTimeIntervalMicroSeconds & | aRampDuration | ) | [virtual] |
const TTimeIntervalMicroSeconds & aRampDuration |
TState | State | ( | ) | [virtual] |
Returns the current state of the audio sample data.
The state of the audio sample data.
5.0
void | Stop | ( | ) | [virtual] |
Stops the playback or recording operation.
The operation is stopped at the current location. For a playback operation, the head is positioned at the last played data.
5.0
Device mode. Used by SetAudioDeviceMode method which is not used from 7.0s 5.0
EDefault = 0 |
The default behaviour. When recording: If a telephony call is in progress, an attempt is made to connect to the telephony downlink plus the device microphone. If there is no telephony call in progress or a connection to the telephony downlink fails, an attempt is made to connect to the device microphone only. When playing: If a telephony call is in progress, an attempt is made to connect to the telephony uplink. If there is no telephony call in progress or a connection to the telephony uplink fails, an attempt is made to connect to the device speaker. |
ETelephonyOrLocal = EDefault |
See EDefault. |
ETelephonyMixed = 1 |
When recording: If a telephony call is in progress the audio source is the telephony downlink mixed with the device microphone. If there is no telephony call in progress or a connection to the telephony downlink fails, no attempt is made to connect to the microphone. When playing: If a telephony call is in progress the audio sample data is played to the telephony uplink and the device speaker. If there is no telephony call in progress or a connection to the telephony uplink fails, no attempt is made to connect to the device speaker. |
ETelephonyNonMixed = 2 |
When recording, the audio source is the telephony downlink and is not mixed with the device microphone. When playing, the audio sample data is played to the telephony uplink and is not mixed with the device speaker. |
ELocal = 3 |
When recording, the audio source is the device microphone. When playing, the audio sample data is played to the device speaker. |