C4 Engine Terathon Software C4 Engine API Documentation

• Sound Manager

API Links
Developer Links

Sound::SetLoopProc

Defined in:  C4Sound.h
Installs a callback procedure which is invoked when a sound loops.
Prototype

void SetLoopProc(LoopProc *proc, void *data = nullptr);

Parameters
proc The loop callback procedure. This parameter may be nullptr, in which case the sound has no loop callback procedure.
data The data which is passed to the loop callback procedure as its second parameter.
Description
The SetLoopProc function sets the callback procedure which is invoked when the sound loops to that given by the proc parameter. The LoopProc type is defined as

typedef void LoopProc(Sound *, void *);

When the function pointed to by the proc parameter is called, the pointer to the sound object and the value supplied in the data parameter are passed to it. By default, there is no loop callback procedure installed.

If the proc parameter is nullptr, then no callback is made when the sound loops.
See Also

Sound::GetLoopCount

Sound::SetLoopCount

Sound::GetLoopIndex

Sound::SetLoopIndex