#include <mw/coesndpy.h>
Link against: cone.lib
class CoeSoundPlayer |
Public Member Enumerations | |
---|---|
enum | anonymous { ENoRepeat, ERepeatForever } |
Public Member Functions | |
---|---|
IMPORT_C void | CancelSound(const TBaSystemSoundType &) |
void | PlaySound(const TBaSystemSoundType &) |
void | PlaySound(const TBaSystemSoundType &, TInt, const TTimeIntervalMicroSeconds32 &) |
void | PlaySoundNow(const TBaSystemSoundType &) |
void | PlaySoundNow(const TBaSystemSoundType &, TInt, const TTimeIntervalMicroSeconds32 &) |
Utility class for simple sound playing.
Must be used in the same thread as an active UI Control Framework environment (CCoeEnv).
This class plays the sound specified by a TBaSystemSoundType object. 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. No sound will play if a match is not found.
Enumerator | Value | Description |
---|---|---|
ENoRepeat | 1 | |
ERepeatForever | KMaxTInt |
IMPORT_C void | CancelSound | ( | const TBaSystemSoundType & | aType | ) | [static] |
Stops playing the specified sound.
Parameters | |
---|---|
aType | The sound to stop playing. |
void | PlaySound | ( | const TBaSystemSoundType & | aType | ) | [static, inline] |
Plays the specified sound.
This function only interrupts another, currently playing, sound if the new sound has a higher priority than the currently playing sound. If you wish to interrupt any currently playing sound and play a new one, use PlaySoundNow() instead of PlaySound().
Parameters | |
---|---|
aType | The sound to play. |
void | PlaySound | ( | const TBaSystemSoundType & | aType, |
TInt | aPlayCount, | |||
const TTimeIntervalMicroSeconds32 & | aGap | |||
) | [static, inline] |
Plays the specified sound for the specifed number of times with the specified interval.
This function only interrupts another, currently playing, sound if the new sound has a higher priority than the current one. If you wish to interrupt any currently playing sound and play a new one, use PlaySoundNow() instead of PlaySound().
Parameters | |
---|---|
aType | The sound to play. |
aPlayCount | The number of times the sound is played. |
aGap | The interval in microseconds between each time the sound is played. |
void | PlaySoundNow | ( | const TBaSystemSoundType & | aType | ) | [static, inline] |
Plays the specified sound, interrupting any other sound that is currently playing.
Parameters | |
---|---|
aType | The sound to play. |
void | PlaySoundNow | ( | const TBaSystemSoundType & | aType, |
TInt | aPlayCount, | |||
const TTimeIntervalMicroSeconds32 & | aGap | |||
) | [static, inline] |
Plays the specified sound the specifed number of times with the specified interval, interrupting any other sound that is currently playing.
Parameters | |
---|---|
aType | The sound to play. |
aPlayCount | The number of times the sound is played. |
aGap | The interval in microseconds between each time the sound is played. |