»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Multimedia TUNER »
CMMTunerAudioRecorderUtility
Location:
Tuner.h
Link against: tuner.lib
This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.
Class CMMTunerAudioRecorderUtility
class CMMTunerAudioRecorderUtility : public CBase;
Description
This class is used to perform recording of audio from the tuner. Many of the methods in this class have identical functionality
to similarly names functions in class CMdaAudioRecorderUtility.
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CMMTunerAudioRecorderUtility
- This class is used to perform recording of audio from the tuner
Members
Defined in CMMTunerAudioRecorderUtility
:
AddMetaDataEntryL()
, CancelRegisterAudioResourceNotification()
, ControllerImplementationInformationL()
, CustomCommandAsync()
, CustomCommandAsync()
, CustomCommandSync()
, CustomCommandSync()
, DestinationBitRateL()
, DestinationDataTypeL()
, DestinationFormatL()
, DestinationNumberOfChannelsL()
, DestinationSampleRateL()
, GetMetaDataEntryL()
, GetNumberOfMetaDataEntries()
, GetPriority()
, GetRecordBalance()
, GetSupportedBitRatesL()
, GetSupportedDestinationDataTypesL()
, GetSupportedNumberOfChannelsL()
, GetSupportedSampleRatesL()
, InitializeL()
, InitializeL()
, MaxGain()
, NewL()
, PauseRecord()
, RecordL()
, RegisterAudioResourceNotification()
, RemoveMetaDataEntry()
, ReplaceMetaDataEntryL()
, SetDestinationBitRateL()
, SetDestinationDataTypeL()
, SetDestinationFormatL()
, SetDestinationNumberOfChannelsL()
, SetDestinationSampleRateL()
, SetGain()
, SetPriority()
, SetRecordBalance()
, Stop()
, ~CMMTunerAudioRecorderUtility()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Construction and destruction
static IMPORT_C CMMTunerAudioRecorderUtility *NewL(CMMTunerUtility &aTuner, MMMTunerAudioRecorderObserver &aObserver);
Description
Create a new audio recorder utility. Note that only one audio recorder utility may be created per instance of CMMTunerUtility
. Multiple instances will result in an error of KErrAlreadyExists when InitializeL()
is called.
Parameters
Return value
~CMMTunerAudioRecorderUtility()
virtual IMPORT_C ~CMMTunerAudioRecorderUtility();
Description
Deconstructor
IMPORT_C void InitializeL(const TDesC &aRecordFilename, TFourCC aDestinationDataType=KFourCCNULL, TUid aControllerUid=TUid::Null(),
TUid aDestinationFormatUid=TUid::Null(), TInt aAudioPriority=EMdaPriorityNormal, TMdaPriorityPreference aPref=EMdaPriorityPreferenceTimeAndQuality);
Description
Initialize for recording from the tuner to the specified file asynchronously. Calls MMMTunerAudioRecorderObserver::MTaroInitializeComplete
on completion
Parameters
const TDesC &aRecordFilename |
The name of the file to create, if necessary, and record to
|
TFourCC aDestinationDataType |
Data type for recording
|
TUid aControllerUid |
The Uid of the controller to use for recording
|
TUid aDestinationFormatUid |
Uid of record format
|
TInt aAudioPriority |
Sound device priority value
|
TMdaPriorityPreference aPref |
Sound device priority preference value
|
|
IMPORT_C void InitializeL(TDes8 &aRecordDescriptor, TFourCC aDestinationDataType=KFourCCNULL, TUid aControllerUid=TUid::Null(),
TUid aDestinationFormatUid=TUid::Null(), TInt aAudioPriority=EMdaPriorityNormal, TMdaPriorityPreference aPref=EMdaPriorityPreferenceTimeAndQuality);
Description
Initialize for recording from the tuner to the specified descriptor asynchronously. Calls MMMTunerAudioRecorderObserver::MTaroInitializeComplete
on completion
Parameters
TDes8 &aRecordDescriptor |
The descriptor to record to
|
TFourCC aDestinationDataType |
Data type for recording
|
TUid aControllerUid |
The Uid of the controller to use for recording
|
TUid aDestinationFormatUid |
Uid of record format
|
TInt aAudioPriority |
Sound device priority value
|
TMdaPriorityPreference aPref |
Sound device priority preference value
|
|
GetSupportedDestinationDataTypesL()
IMPORT_C void GetSupportedDestinationDataTypesL(RArray< TFourCC > &aSupportedDataTypes) const;
Description
Return a list of the supported data types for the record destination
Parameters
RArray < TFourCC > &aSupportedDataTypes |
list of four character codes, representing supported data encodings for the record destination. Can leave with one of the
system-wide error codes
|
|
SetDestinationDataTypeL()
IMPORT_C void SetDestinationDataTypeL(TFourCC aDataType);
Description
Set the data type of the destination audio clip
Parameters
TFourCC aDataType |
four character code, representing the encoding of the destination audio clip Can leave with one of the system-wide error
codes
|
|
IMPORT_C TFourCC DestinationDataTypeL() const;
Description
Return the data type of the destination audio clip
Return value
TFourCC
|
four character code, representing the encoding of the destination audio clip Can leave with one of the system-wide error
codes
|
|
IMPORT_C void SetDestinationBitRateL(TUint aBitRate);
Description
Set the bit rate for recording
Parameters
TUint aBitRate |
destination bit rate in bits/second Can leave with one of the system-wide error codes
|
|
IMPORT_C TUint DestinationBitRateL() const;
Description
Return the recording bit rate
Return value
TUint
|
destination bit rate in bits/second Can leave with one of the system-wide error codes
|
|
IMPORT_C void GetSupportedBitRatesL(RArray< TUint > &aSupportedBitRates) const;
Description
Return a list of the supported bit rates for recording
Parameters
RArray < TUint > &aSupportedBitRates |
List of bit rates supported for the record destination Can leave with one of the system-wide error codes
|
|
SetDestinationSampleRateL()
IMPORT_C void SetDestinationSampleRateL(TUint aSampleRate);
Description
Set the sample rate for the record destination
Parameters
TUint aSampleRate |
The sample rate of the record destination Can leave with one of the system-wide error codes
|
|
IMPORT_C TUint DestinationSampleRateL() const;
Description
Return the sample rate of the record destination
Return value
TUint
|
The sample rate of the record destination Can leave with one of the system-wide error codes
|
|
GetSupportedSampleRatesL()
IMPORT_C void GetSupportedSampleRatesL(RArray< TUint > &aSupportedSampleRates) const;
Description
Get a list of supported recording sample rates.
Parameters
RArray < TUint > &aSupportedSampleRates |
List of the sample rates that are supported for recording Can leave with one of the system-wide error codes
|
|
IMPORT_C void SetDestinationFormatL(TUid aFormatUid);
Description
Set the format of the audio clip. This can only be done if the audio clip does not exist
Parameters
TUid aFormatUid |
Uid of the audio clip format KErrAlreadyExists if the clip already exists and the format is different from the existing format,
or can leave with one of the system-wide error codes
|
|
IMPORT_C TUid DestinationFormatL() const;
Description
Return the format of the audio clip
Return value
TUid
|
Uid of the audio clip format Can leave with one of the system-wide error codes
|
|
SetDestinationNumberOfChannelsL()
IMPORT_C void SetDestinationNumberOfChannelsL(TUint aNumberOfChannels);
Description
Set the number of channels for the recorded audio clip
Parameters
TUint aNumberOfChannels |
The number of channels to record Can leave with one of the system-wide error codes
|
|
DestinationNumberOfChannelsL()
IMPORT_C TUint DestinationNumberOfChannelsL() const;
Description
Return the number of channels in audio clip
Return value
TUint
|
number of channels supported by audio clip Can leave with one of the system-wide error codes
|
|
GetSupportedNumberOfChannelsL()
IMPORT_C void GetSupportedNumberOfChannelsL(RArray< TUint > &aSupportedNumChannels) const;
Description
Return a list of the supported number of channels for recording
Parameters
RArray < TUint > &aSupportedNumChannels |
List of the number of channels supported for recording Can leave with one of the system-wide error codes
|
|
IMPORT_C void RecordL();
Description
Start recording of the tuner output
IMPORT_C TInt PauseRecord();
Description
Pause recording. Recording can be resumed with another call to Record.
Return value
TInt
|
A standard system error code
|
|
IMPORT_C void Stop();
Description
Stop recording, and release the output device for use by other clients
Recording should already be under way.
IMPORT_C TInt MaxGain() const;
Description
Return the maximum value for the gain
Return value
TInt
|
The maximum gain. For devices where automatic gain control is used, this value may be zero.
|
|
IMPORT_C void SetGain(TInt aGain);
Description
Sets the gain for the audio device to a specified value.
Parameters
TInt aGain |
The gain setting. This can be any value from zero to the value returned by a call to MaxGain() . A value which is less than zero is set to zero. A value which is greater than MaxGain() is set to MaxGain() .
|
|
IMPORT_C TInt SetRecordBalance(TInt aBalance=KMMFBalanceCenter);
Description
Sets the current recording balance setting between the left and right stereo channels
The balance can be changed before or during recording and is effective immediately.
Parameters
TInt aBalance |
The balance value to set. Any value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight, the default value being KMMFBalanceCenter.
|
|
Return value
TInt
|
An error code indicating if the call was successful. KErrNone on success, otherwise another of the system-wide error codes.
|
|
IMPORT_C TInt GetRecordBalance(TInt &aBalance) const;
Description
Returns the current recording balance setting between the left and right stereo channels.
Parameters
TInt &aBalance |
On return, contains the current recording balance between KMMFBalanceMaxLeft and KMMFBalanceMaxRight.
|
|
Return value
TInt
|
An error code indicating if the call was successful. KErrNone on success, otherwise another of the system-wide error codes.
|
|
IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
Description
Set the current audio priority. This priority is used to arbitrate between multiple audio sources trying to access the audio
hardware.
Parameters
TInt aPriority |
A priority between EMdaPriorityMin and EMdaPriorityMax
|
TMdaPriorityPreference aPref |
Time vs Quality priority preferences, enumerated in TMdaPriorityPreference
|
|
Return value
TInt
|
A standard system error code
|
|
IMPORT_C TInt GetPriority(TInt &aPriority, TMdaPriorityPreference &aPref) const;
Description
Get the current audio priority. This is used to arbitrate between simultaneous accesses to the sound hardware.
Parameters
TInt &aPriority |
A priority between EMdaPriorityMin and EMdaPriorityMax to return
|
TMdaPriorityPreference &aPref |
Time vs Quality priority preferences to return, enumerated in TMdaPriorityPreference
|
|
Return value
TInt
|
A standard system error code
|
|
RegisterAudioResourceNotification()
IMPORT_C TInt RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &aCallback, TUid aNotificationEventUid,
const TDesC8 *aNotificationRegistrationData=0);
Description
Register for audio resource notifications, in the event that the audio resource is lost due to pre-emption by a higher priority
audio client.
Parameters
Return value
CancelRegisterAudioResourceNotification()
IMPORT_C void CancelRegisterAudioResourceNotification(TUid aNotificationEventId);
Description
Cancel an outstanding audio resource notification.
Parameters
TUid aNotificationEventId |
uid of event to cancel
|
|
ControllerImplementationInformationL()
IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL();
Description
Return the controller implementation information structure of the current controller
Return value
Leave codes
KErrNoMemory |
Out of memory
|
|
GetNumberOfMetaDataEntries()
IMPORT_C TInt GetNumberOfMetaDataEntries(TInt &aNumEntries);
Description
Returns the number of meta data entries in the current clip
Parameters
Return value
TInt
|
TInt One of the global error codes
|
|
IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TInt aMetaDataIndex);
Description
Returns the requested meta data entry
Parameters
Return value
Leave codes
Leaves |
with KErrNotFound if the meta data entry does not exist or KErrNotImplemented if the implementation does not support meta
data information. Other errors indicate more general system failure.
|
|
IMPORT_C void AddMetaDataEntryL(CMMFMetaDataEntry &aMetaDataEntry);
Description
Adds meta data to the clip.
Parameters
Leave codes
One |
of the system-wide error codes.
|
|
IMPORT_C TInt RemoveMetaDataEntry(TInt aMetaDataIndex);
Description
Removes a meta data entry from the clip.
Parameters
TInt aMetaDataIndex |
The index of the meta data entry to delete.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C void ReplaceMetaDataEntryL(TInt aMetaDataIndex, CMMFMetaDataEntry &aNewMetaDataEntry);
Description
Replaces a meta data in the clip.
Parameters
TInt aMetaDataIndex |
The ID of the meta data entry to replace.
|
CMMFMetaDataEntry &aNewMetaDataEntry |
The details of the new entry to be added.
|
|
Leave codes
One |
of the system-wide error codes.
|
|
IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2);
Description
Send a synchronous custom command to the recording controller
Parameters
const TMMFMessageDestinationPckg &aDestination |
The destination of the message, consisting of the uid of the interface of this message
|
TInt aFunction |
The function number to indicate which function is to be called on the interface defined in the aDestination parameter
|
const TDesC8 &aDataTo1 |
The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
const TDesC8 &aDataTo2 |
The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
|
Return value
TInt
|
A standard system error code
|
|
IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TDes8 &aDataFrom);
Description
Send a synchronous custom command to the recording controller
Parameters
const TMMFMessageDestinationPckg &aDestination |
The destination of the message, consisting of the uid of the interface of this message
|
TInt aFunction |
The function number to indicate which function is to be called on the interface defined in the aDestination parameter
|
const TDesC8 &aDataTo1 |
The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
const TDesC8 &aDataTo2 |
The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
TDes8 &aDataFrom |
The area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.
|
|
Return value
TInt
|
A standard system error code
|
|
IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TRequestStatus &aStatus);
Description
Send an asynchronous custom command to the recording controller
Parameters
const TMMFMessageDestinationPckg &aDestination |
The destination of the message, consisting of the uid of the interface of this message
|
TInt aFunction |
The function number to indicate which function is to be called on the interface defined in the aDestination parameter
|
const TDesC8 &aDataTo1 |
The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
const TDesC8 &aDataTo2 |
The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
TRequestStatus &aStatus |
The TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent
on the interface.
|
|
IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TDes8 &aDataFrom, TRequestStatus &aStatus);
Description
Send an asynchronous custom command to the recording controller
Parameters
const TMMFMessageDestinationPckg &aDestination |
The destination of the message, consisting of the uid of the interface of this message
|
TInt aFunction |
The function number to indicate which function is to be called on the interface defined in the aDestination parameter
|
const TDesC8 &aDataTo1 |
The first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
const TDesC8 &aDataTo2 |
The second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface
being called. Can be KNullDesC8.
|
TDes8 &aDataFrom |
The area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.
|
TRequestStatus &aStatus |
The TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent
on the interface.
|
|