int SoundPlay(int sn);
Plays a sound file.
Return Value
Returns zero if successful.
Parameters
sn Handle to the sound file.
Remarks
SoundPlay() plays a sound file represented by an integer handle returned by SoundAdd().
Availability
Available in DragonFireSDK 1.0 and later.
Example
The example below loads a file called "Boom.snd" and calls SoundPlay() to play back the sound. SoundStop() is called in AppExit() to halt playback.
#include "DragonFireSDK.h"
int SoundHandle;
void AppMain() { SoundHandle = SoundAdd("Boom.snd"); SoundPlay(SoundHandle); }
void AppExit() { SoundStop(SoundHandle); }
void OnTimer() {
} |