diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-A748041F-5925-54F8-AA21-C1CE8E0473AA.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-A748041F-5925-54F8-AA21-C1CE8E0473AA.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,19 @@ + + + + + +Playing a Tone This tutorial introduces you to play a single tone.

You have to configure DevSound in order to play a tone. The following settings can be configured before or during tone play:

  • To set the number of times a tone is to be repeated during playback use the CMMFDevSound::SetToneRepeats(TInt,const + TTimeIntervalMicroSeconds &) method.

  • To change the volume of the audio device to a specific value, use the CMMFDevSound::SetVolume(TInt) 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(const + TTimeIntervalMicroSeconds &) function.

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

  • To set the speaker balance, use the CMMFDevSound::SetPlayBalanceL(TInt,TInt) function.

  • 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 CMMFDevSound::PlayToneL(TInt,const + TTimeIntervalMicroSeconds &) to start playing a tone. When an attempt to play a tone has completed, successfully or otherwise, DevSound calls the MDevSoundObserver::ToneFinished() function. Note: Further calls to CMMFDevSound::PlayToneL() can be made both before and after the MDevSoundObserver::ToneFinished() call back is received. If subsequent calls are made to CMMFDevSound::PlayToneL(), only one MDevSoundObserver::ToneFinished() call back is received.

The result of this tutorial is you can play a single tone successfully.

When you want to play two tones simultaneously, the CMMFDevSound::PlayDualToneL(TInt,TInt,const TTimeIntervalMicroSeconds + &) function is called instead of PlayToneL(). CMMFDevSound::PlayDualToneL has an extra parameter, aFrequencyTwo, to specify the frequency at which the second tone is to be played.

Playing a Tone + Sequence Playing a Fixed Tone + Sequence Pausing and + Resuming a Tone
\ No newline at end of file