The Audio Tone Player, provided by the class
Single tone of a specified duration and frequency
Dual Tone Multi Frequency (DTMF) strings
Sequences of tones held in files or descriptors
Predefined (fixed) sequences of tones held in any mobile equipment
Client applications such as ringtone applications, use
The tone player provides a simple interface to generate single and multiple tones. Once the tone player object has been constructed, multiple tones and tone sequences can be played without having to create new instances of the object.
Using the tone player typically involves the following steps:
Constructing a tone player
The
create a tone player with default priority settings:
create a tone player with your own settings:
Both functions pass a reference of the
Preparing a tone player
Once the tone player object is created, it has to be prepared to play a tone or a DTMF string. use one of the following prepare member functions to get it ready for playing the corresponding tone.
The two tones, aFrequencyOne and aFrequencyTwo, are measured in Hz, and the duration of the tone, aDuration, is measured in microseconds.
All the prepare member functions are asynchronous. In response to each,
On completion of a prepare, the observer function
You can cancel any prepare function using
Playing a tone
Once the player is prepared successfully, certain configurations can be done before playing the tone as listed below:
Upon successful configuration, the Play() can be called as shown below.
Here, the tone player uses the
This function is asynchronous. It retrieves the details of the type of tone to play from the previous
Playing the tone or DTMF string can be customised using the following member functions as mentioned below:
You can repeat the tone sequence indefinitely by setting
For example:
To play another tone or sequence, either wait for
Cancelling a tone
The observer callback function is not called on completion of the cancel.
Retrieving a custom interface
To retrieve a custom interface to the underlying device, use the
The function returns a pointer to the interface implementation, or NULL if the device does not implement the interface requested. You must cast the return value to the correct type.
The Audio Tone Player, provided by the class
Single tone +of a specified duration and frequency
Dual Tone Multi +Frequency (DTMF) strings
Sequences of +tones held in files or descriptors
Predefined (fixed) +sequences of tones held in any mobile equipment
Client applications such as ringtone applications, use
The tone player provides a simple interface +to generate single and multiple tones. Once the tone player object +has been constructed, multiple tones and tone sequences can be played +without having to create new instances of the object.
Using +the tone player typically involves the following steps:
Constructing a tone +player
The
create a tone +player with default priority settings:
create a tone +player with your own settings:
Both functions pass a reference of the
Preparing a tone +player
Once the tone player object is created, it has +to be prepared to play a tone or a DTMF string. use one of the following +prepare member functions to get it ready for playing the corresponding +tone.
The two tones, aFrequencyOne and aFrequencyTwo, are measured +in Hz, and the duration of the tone, aDuration, is measured in microseconds.
All the prepare member functions are asynchronous. In response
+to each,
On completion of a prepare, the observer
+function
You can cancel any prepare
+function using
Playing a tone
Once the player is prepared successfully, certain configurations +can be done before playing the tone as listed below:
Upon successful configuration, the Play() can be called as +shown below.
Here, the tone player uses the
This function is
+asynchronous. It retrieves the details of the type of tone to play
+from the previous
Playing the tone or +DTMF string can be customised using the following member functions +as mentioned below:
You can repeat the tone sequence indefinitely by setting
For example:
To play another tone or sequence, either wait for
Cancelling a tone
The observer callback function is not called on completion +of the cancel.
Retrieving a custom +interface
To retrieve a custom interface to the underlying
+device, use the
The function returns a pointer to the interface +implementation, or NULL if the device does not implement the interface +requested. You must cast the return value to the correct type.