CMdaAudioToneUtility Class Reference

class CMdaAudioToneUtility : public CBase

Generates tones on an audio capable EPOC device.

The class offers an interface for generating tones on all audio capable EPOC devices.

To use the tone utility:

1. Create an instance by calling NewL().

2. Call the appropriate PrepareToPlay variant for the required tone type and wait for the callback indicating success.

3. Call Play and either wait for the callback to indicate completion, or call CancelPlay to end playback early.

4. Delete the instance.

It is possible to call Play before calling any PrepareToPlay variant. This will result in a default fixed sequence tone being played.

5.0

Inherits from

  • CMdaAudioToneUtility
Public Member Functions
~CMdaAudioToneUtility()
voidCancelPlay()
voidCancelPrepare()
IMPORT_C TAny *CustomInterface(TUid)
TInt FixedSequenceCount()
const TDesC &FixedSequenceName(TInt)
IMPORT_C TIntGetBalanceL()
TInt MaxVolume()
IMPORT_C CMdaAudioToneUtility *NewL(MMdaAudioToneObserver &, CMdaServer *)
IMPORT_C CMdaAudioToneUtility *NewL(MMdaAudioToneObserver &, CMdaServer *, TInt, TInt)
IMPORT_C TIntPause()
voidPlay()
voidPrepareToPlayDTMFString(const TDesC &)
voidPrepareToPlayDesSequence(const TDesC8 &)
IMPORT_C voidPrepareToPlayDualTone(TInt, TInt, const TTimeIntervalMicroSeconds &)
voidPrepareToPlayFileSequence(const TDesC &)
IMPORT_C voidPrepareToPlayFileSequence(RFile &)
voidPrepareToPlayFixedSequence(TInt)
voidPrepareToPlayTone(TInt, const TTimeIntervalMicroSeconds &)
IMPORT_C voidRegisterPlayStartCallback(MMdaAudioTonePlayStartObserver &)
IMPORT_C TIntResume()
IMPORT_C voidSetBalanceL(TInt)
voidSetDTMFLengths(TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32)
voidSetPriority(TInt, TInt)
voidSetRepeats(TInt, const TTimeIntervalMicroSeconds &)
voidSetVolume(TInt)
voidSetVolumeRamp(const TTimeIntervalMicroSeconds &)
TMdaAudioToneUtilityState State()
TInt Volume()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Protected Attributes
CMMFMdaAudioToneUtility *iProperties

Constructor & Destructor Documentation

~CMdaAudioToneUtility()

~CMdaAudioToneUtility()

Member Functions Documentation

CancelPlay()

voidCancelPlay()[virtual]

CancelPrepare()

voidCancelPrepare()[virtual]

CustomInterface(TUid)

IMPORT_C TAny *CustomInterface(TUidaInterfaceId)

Parameters

TUid aInterfaceId

FixedSequenceCount()

TInt FixedSequenceCount()[virtual]

FixedSequenceName(TInt)

const TDesC &FixedSequenceName(TIntaSequenceNumber)[virtual]

Parameters

TInt aSequenceNumber

GetBalanceL()

IMPORT_C TIntGetBalanceL()

MaxVolume()

TInt MaxVolume()[virtual]

NewL(MMdaAudioToneObserver &, CMdaServer *)

IMPORT_C CMdaAudioToneUtility *NewL(MMdaAudioToneObserver &aObserver,
CMdaServer *aServer = NULL
)[static]

Parameters

MMdaAudioToneObserver & aObserver
CMdaServer * aServer = NULL

NewL(MMdaAudioToneObserver &, CMdaServer *, TInt, TInt)

IMPORT_C CMdaAudioToneUtility *NewL(MMdaAudioToneObserver &aObserver,
CMdaServer *aServer,
TIntaPriority,
TIntaPref = EMdaPriorityPreferenceTimeAndQuality
)[static]

Parameters

MMdaAudioToneObserver & aObserver
CMdaServer * aServer
TInt aPriority
TInt aPref = EMdaPriorityPreferenceTimeAndQuality

Pause()

IMPORT_C TIntPause()

Play()

voidPlay()[virtual]

PrepareToPlayDTMFString(const TDesC &)

voidPrepareToPlayDTMFString(const TDesC &aDTMF)[virtual]

Parameters

const TDesC & aDTMF

PrepareToPlayDesSequence(const TDesC8 &)

voidPrepareToPlayDesSequence(const TDesC8 &aSequence)[virtual]

Parameters

const TDesC8 & aSequence

PrepareToPlayDualTone(TInt, TInt, const TTimeIntervalMicroSeconds &)

IMPORT_C voidPrepareToPlayDualTone(TIntaFrequencyOne,
TIntaFrequencyTwo,
const TTimeIntervalMicroSeconds &aDuration
)

Parameters

TInt aFrequencyOne
TInt aFrequencyTwo
const TTimeIntervalMicroSeconds & aDuration

PrepareToPlayFileSequence(const TDesC &)

voidPrepareToPlayFileSequence(const TDesC &aFileName)[virtual]

Parameters

const TDesC & aFileName

PrepareToPlayFileSequence(RFile &)

IMPORT_C voidPrepareToPlayFileSequence(RFile &aFile)

Parameters

RFile & aFile

PrepareToPlayFixedSequence(TInt)

voidPrepareToPlayFixedSequence(TIntaSequenceNumber)[virtual]

Parameters

TInt aSequenceNumber

PrepareToPlayTone(TInt, const TTimeIntervalMicroSeconds &)

voidPrepareToPlayTone(TIntaFrequency,
const TTimeIntervalMicroSeconds &aDuration
)[virtual]

Parameters

TInt aFrequency
const TTimeIntervalMicroSeconds & aDuration

RegisterPlayStartCallback(MMdaAudioTonePlayStartObserver &)

IMPORT_C voidRegisterPlayStartCallback(MMdaAudioTonePlayStartObserver &aObserver)

Parameters

MMdaAudioTonePlayStartObserver & aObserver

Resume()

IMPORT_C TIntResume()

SetBalanceL(TInt)

IMPORT_C voidSetBalanceL(TIntaBalance =  KMMFBalanceCenter )

Parameters

TInt aBalance =  KMMFBalanceCenter

SetDTMFLengths(TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32)

voidSetDTMFLengths(TTimeIntervalMicroSeconds32aToneLength,
TTimeIntervalMicroSeconds32aToneOffLength,
TTimeIntervalMicroSeconds32aPauseLength
)[virtual]

SetPriority(TInt, TInt)

voidSetPriority(TIntaPriority,
TIntaPref
)[virtual]

Parameters

TInt aPriority
TInt aPref

SetRepeats(TInt, const TTimeIntervalMicroSeconds &)

voidSetRepeats(TIntaRepeatNumberOfTimes,
const TTimeIntervalMicroSeconds &aTrailingSilence
)[virtual]

Parameters

TInt aRepeatNumberOfTimes
const TTimeIntervalMicroSeconds & aTrailingSilence

SetVolume(TInt)

voidSetVolume(TIntaVolume)[virtual]

Parameters

TInt aVolume

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

voidSetVolumeRamp(const TTimeIntervalMicroSeconds &aRampDuration)[virtual]

Parameters

const TTimeIntervalMicroSeconds & aRampDuration

State()

TMdaAudioToneUtilityState State()[virtual]

Volume()

TInt Volume()[virtual]

Member Data Documentation

CMMFMdaAudioToneUtility * iProperties

CMMFMdaAudioToneUtility *iProperties[protected]

This member is internal and not intended for use.