Location:
MdaAudioTonePlayer.h
Link against: MediaClientAudio.lib
CMdaAudioToneUtility
Supported from 5.0
Generates tones on an audio capable EPOC device.
The class offers an interface for generating tones on all audio capable EPOC devices.
While this class is abstract, the static 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 Media Server implementation and is private.
|
Defined in CMdaAudioToneUtility
:
CancelPlay()
, CancelPrepare()
, FixedSequenceCount()
, FixedSequenceName()
, MaxVolume()
, NewL()
, Play()
, PrepareToPlayDTMFString()
, PrepareToPlayDesSequence()
, PrepareToPlayFileSequence()
, PrepareToPlayFixedSequence()
, PrepareToPlayTone()
, SetDTMFLengths()
, SetPriority()
, SetRepeats()
, SetVolume()
, SetVolumeRamp()
, State()
, Volume()
Inherited from CBase
:
operator new()
static CMdaAudioToneUtility* NewL(MMdaAudioToneObserver& aObserver, CMdaServer* aServer=NULL);
Constructs and initialises a new instance of the audio tone utility.
The function leaves if the audio tone utility object cannot be created.
|
|
virtual void PrepareToPlayTone(TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration) = 0;
Configures the audio tone player utility to play a single tone.
This function is asynchronous. On completion, the observer
callback function MMdaAudioToneObserver::MatoPrepareComplete()
is
called, indicating the success or failure of the configuration
operation.
The configuration operation can be cancelled by calling
CMdaAudioToneUtility::CancelPrepare()
.
The configuration operation cannot be started if a play operation is in progress.
|
virtual void PrepareToPlayDTMFString(const TDesC& aDTMF) = 0;
Configures the audio tone utility player to play a DTMF (Dual-Tone Multi-Frequency) string.
This function is asynchronous. On completion, the observer
callback function MMdaAudioToneObserver::MatoPrepareComplete()
is
called, indicating the success or failure of the configuration
operation.
The configuration operation can be cancelled by calling
CMdaAudioToneUtility::CancelPrepare()
.
The configuration operation cannot be started if a play operation is in progress.
|
virtual void PrepareToPlayFileSequence(const TDesC& aFilename) = 0;
Configures the audio tone player utility to play a tone sequence contained in a file.
This function is asynchronous. On completion, the observer callback
function MMdaAudioToneObserver::MatoPrepareComplete()
is called,
indicating the success or failure of the configuration operation.
The configuration operation can be cancelled by calling
CMdaAudioToneUtility::CancelPrepare()
.
The configuration operation cannot be started if a play operation is in progress.
|
virtual void PrepareToPlayDesSequence(const TDesC8& aSequence) = 0;
Configures the audio tone player utility to play a tone sequence contained in a descriptor.
This function is asynchronous. On completion, the observer callback
function MMdaAudioToneObserver::MatoPrepareComplete()
is called,
indicating the success or failure of the configuration operation.
The configuration operation can be cancelled by calling
CMdaAudioToneUtility::CancelPrepare()
.
The configuration operation cannot be started if a play operation is in progress.
|
virtual void PrepareToPlayFixedSequence(TInt aSequenceNumber) = 0;
Configures the audio tone player utility to play the specified pre-defined tone sequence.
This function is asynchronous. On completion, the observer callback
function MMdaAudioToneObserver::MatoPrepareComplete()
is called,
indicating the success or failure of the configuration operation.
The configuration operation can be cancelled by calling
CMdaAudioToneUtility::CancelPrepare()
.
The configuration operation cannot be started if a play operation is in progress.
|
virtual void CancelPrepare() = 0;
Cancels the configuration operation.
The observer callback function
MMdaAudioToneObserver::MatoPrepareComplete()
is not
called.
virtual void Play() = 0;
Plays the tone. The tone played depends on the current configuration.
This function is asynchronous. On completion, the observer callback
function MMdaAudioToneObserver::MatoPlayComplete()
is called,
indicating the success or failure of the play operation.
The play operation can be cancelled by
callingCMdaAudioToneUtility::CancelPlay()
.
virtual void CancelPlay() = 0;
Cancels the tone playing operation.
The observer callback
functionMMdaAudioToneObserver::MatoPlayComplete()
is not
called.
virtual void SetDTMFLengths(TTimeIntervalMicroSeconds32 iToneOnLength,TTimeIntervalMicroSeconds32 iToneOffLength,TTimeIntervalMicroSeconds32 iPauseLength) = 0;
Change the duration of DTMF tones, the gaps between DTMF tones and the pauses.
|
virtual void SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
Changes the client’s priority
|
virtual void SetVolume(TInt aVolume) = 0;
Changes the volume of the audio device.
The volume can be changed before or during play and is effective immediately.
|
virtual void SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;
Sets the number of times the tone sequence is to be repeated during the play operation.
A period of silence can follow each playing of the tone sequence. The tone sequence can be repeated indefinitely.
|
virtual void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
Defines the period over which the volume level is to rise smoothly from nothing to the normal volume level.
|
virtual TInt FixedSequenceCount() = 0;
Returns the number of available pre-defined tone sequences.
|
virtual const TDesC& FixedSequenceName(TInt aSequenceNumber) = 0;
Returns the name assigned to a specific pre-defined tone sequence.
|
|
virtual TMdaAudioToneUtilityState State() = 0;
Returns the current state of the audio tone utility.
|
virtual TInt Volume() = 0;
Returns an integer representing the current volume of the audio device.
|
virtual TInt MaxVolume() = 0;
Returns an integer representing the maximum volume. This is the maximum
value which can be passed
toCMdaAudioToneUtility::SetVolume()
.
|