int SoundLoop(int sn);

 

Plays a sound file in an infinite loop, or until SoundStop() is called on the file.

 

Return Value

 

Returns zero if successful.

 

Parameters

 

sn

Handle to the sound file.

 

Remarks

 

SoundLoop() plays a sound file represented by an integer handle returned by SoundAdd() infinitely, or until SoundStop() is called on the file.

 

Availability

 

Available in DragonFireSDK 1.1 and later.

 

Example

 

The example below loads a file called "Boom.snd" and calls SoundLoop() to play back the sound infinitely. SoundStop() is called in AppExit() to halt playback.

 

#include "DragonFireSDK.h"

 

int SoundHandle;

 

void AppMain()

{

  SoundHandle = SoundAdd("Boom.snd");

  SoundLoop(SoundHandle);

}

 

void AppExit()

{

  SoundStop(SoundHandle);

}

 

void OnTimer()

{

 

}