System Sounds provides a simple and a consistent way for applications to produce sounds for common events such as messages and errors.
Sounds are specified logically, so that the actual corresponding physical sounds produced can vary with device configuration. Sounds can be file-based (for example, WAV), tones, or a fixed-tone sequences.
System Sounds is a layer over the Media Server, which handles playing the audio.
It has three key concepts - logical sound, sound player and system sound information.
A sound to play is specified logically using two UIDs. The first UID specifies the category of the sound, such as rings, alarms, errors and messages. The second UID is optional and it specifies an instance of that category, such as new SMS arrived, or battery low.
The pair of UIDs is encapsulated in TBaSystemSoundType.
The sound player plays the sound specified by TBaSystemSoundType. The caller can request the sound to be repeated, and the time between repeats. If the exact sound cannot be found on a particular device, a match only by category (first UID) is used. A default sound is used if no match is found.
The sound player class is CoeSoundPlayer.
The characteristics of a physical sound that corresponds to a logical sound are encapsulated in a TBaSystemSoundInfo.
You can get and set the physical sound for a logical sound through BaSystemSound.