Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <Tuner.h>
Link against: tuner.lib
This item is not part of the S60 5th Edition SDK

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

Members

Defined in CMMTunerAudioRecorderUtility:

Inherited from CBase:


Construction and destruction


NewL(CMMTunerUtility &,MMMTunerAudioRecorderObserver &)

Interface status: deprecated Use CMMTunerUtility::GetTunerAudioRecorderUtilityL() instead

IMPORT_C static 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 CMMTunerAudioRecorderUtility::InitializeL(const TDesC &,TFourCC,TUid,TUid,TInt,TMdaPriorityPreference) is called.

Parameters

CMMTunerUtility &aTuner

CMMTunerUtility reference to a TunerUtility object from which this will be created

MMMTunerAudioRecorderObserver &aObserver

reference to an instance of the MMMTunerAudioRecorderObserver callback functions class

Return value

CMMTunerAudioRecorderUtility *


~CMMTunerAudioRecorderUtility()

IMPORT_C virtual ~CMMTunerAudioRecorderUtility();

Description

Deconstructor

[Top]


Member functions


InitializeL(const TDesC &,TFourCC,TUid,TUid,TInt,TMdaPriorityPreference)

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(TInt) on completion

Parameters

const TDesC16 &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


InitializeL(TDes8 &,TFourCC,TUid,TUid,TInt,TMdaPriorityPreference)

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(TInt) 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(RArray< TFourCC > &)const

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(TFourCC)

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


DestinationDataTypeL()const

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


SetDestinationBitRateL(TUint)

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


DestinationBitRateL()const

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


GetSupportedBitRatesL(RArray< TUint > &)const

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(TUint)

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


DestinationSampleRateL()const

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(RArray< TUint > &)const

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


SetDestinationFormatL(TUid)

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


DestinationFormatL()const

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(TUint)

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()const

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(RArray< TUint > &)const

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


RecordL()

IMPORT_C void RecordL();

Description

Start recording of the tuner output


PauseRecord()

IMPORT_C TInt PauseRecord();

Description

Pause recording. Recording can be resumed with another call to Record.

Return value

TInt

A standard system error code


Stop()

IMPORT_C void Stop();

Description

Stop recording, and release the output device for use by other clients

Recording should already be under way.


MaxGain()const

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.


SetGain(TInt)

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 CMMTunerAudioRecorderUtility::MaxGain()const. A value which is less than zero is set to zero. A value which is greater than CMMTunerAudioRecorderUtility::MaxGain()const is set to CMMTunerAudioRecorderUtility::MaxGain()const.


SetRecordBalance(TInt)

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.


GetRecordBalance(TInt &)const

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.


SetPriority(TInt,TMdaPriorityPreference)

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


GetPriority(TInt &,TMdaPriorityPreference &)const

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(MMMFAudioResourceNotificationCallback &,TUid,const TDesC8 *)

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

MMMFAudioResourceNotificationCallback &aCallback

instance of callback class to use

TUid aNotificationEventUid

uid of event to pass back

const TDesC8 *aNotificationRegistrationData

additional data needed by user application

Return value

TInt


CancelRegisterAudioResourceNotification(TUid)

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

const CMMFControllerImplementationInformation &

A reference to the current controller information

Leave codes

KErrNoMemory

Out of memory


GetNumberOfMetaDataEntries(TInt &)

IMPORT_C TInt GetNumberOfMetaDataEntries(TInt &aNumEntries);

Description

Returns the number of meta data entries in the current clip

Parameters

TInt &aNumEntries

Return value

TInt

TInt One of the global error codes


GetMetaDataEntryL(TInt)

IMPORT_C CMMFMetaDataEntry* GetMetaDataEntryL(TInt aMetaDataIndex);

Description

Returns the requested meta data entry

Parameters

TInt aMetaDataIndex

Return value

CMMFMetaDataEntry *

"CMMFMetaDataEntry*" The meta data entry to return

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.


AddMetaDataEntryL(CMMFMetaDataEntry &)

IMPORT_C void AddMetaDataEntryL(CMMFMetaDataEntry &aMetaDataEntry);

Description

Adds meta data to the clip.

Parameters

CMMFMetaDataEntry &aMetaDataEntry

The details of the new entry to be added.

Leave codes

One

of the system-wide error codes.


RemoveMetaDataEntry(TInt)

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.


ReplaceMetaDataEntryL(TInt,CMMFMetaDataEntry &)

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.


CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &)

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 TPckgBuf &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


CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &)

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 TPckgBuf &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


CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)

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 TPckgBuf &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.


CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)

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 TPckgBuf &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.