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.
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.