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:

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.