diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-3AB05112-0580-5FD2-AD61-5721090062F8.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-3AB05112-0580-5FD2-AD61-5721090062F8.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,16 @@ + + + + + +Playing a DTMF Tone This tutorial describes about how to play a DTMF(Dual and Multi-Frequency) Tone.

You have to configure DevSound in order to play a DTMF tone.

The following settings can be configured before or during DTMF tone play:

  • To set the duration of tone on, tone off and tone pause to be used during the DTMF tone playback, use the CMMFDevSound::SetDTMFLengths() method.

    IMPORT_C void SetDTMFLengths(TTimeIntervalMicroSeconds32 &aToneOnLength, +TTimeIntervalMicroSeconds32 &aToneOffLength, TTimeIntervalMicroSeconds32 +&aPauseLength);

    This method has three parameters:

    • &aToneOnLength - the period over which the tone is to be played.

    • &aToneOffLength - the period over which no tone is to be played.

    • &aPauseLength - the period over which tone playing is to be paused.

    The internal configuration set by CMMFDevSound::SetDTMFLengths() lasts until it is recalled or for the lifetime of the current DevSound.

    Note: The CMMFDevSound::SetDTMFLengths() function is only available during tone play.

  • To change the volume of the audio device to a specific value, use the CMMFDevSound::SetVolume() function. The volume can be set to any value from 0 to CMMFDevSound::MaxVolume().

    To define a period over which the volume rises from 0 to the normal volume level, use the CMMFDevSound::SetVolumeRamp() function.

    Note: The CMMFDevSound::SetVolumeRamp() function is only available during tone play.

  • To set the speaker balance, use the CMMFDevSound::SetPlayBalanceL() function. This function has two parameters:

    • aLeftPercentage - the left speaker volume percentage.

    • aRightPercentage - the right speaker volume percentage.

  • To set the priority setting for this instance of DevSound to access the audio device, use the CMMFDevSound::SetPrioritySettings() method. Priority settings are used by the Audio Policy component to resolve multiple requests to access the audio hardware.

Call the CMMFDevSound::PlayDTMFStringL(const TDesC + &) function to start playing a DTMF tone. CMMFDevSound::PlayDTMFStringL() has one parameter, &aDTMFString, the DTMF sequence in a descriptor. If CMMFDevSound::SetDTMFLengths() is called during play, it takes effect when the next tone is generated. When an attempt to play DTMF tones has completed, successfully or otherwise, DevSound calls the MDevSoundObserver::ToneFinished(TInt) function. Note: Further calls to CMMFDevSound::PlayDTMFStringL(const TDesC &) can be made both before and after the MDevSoundObserver::ToneFinished(TInt) callback is received.
Pausing and + Resuming a Tone
\ No newline at end of file