C4 Engine Terathon Software C4 Engine API Documentation

• Sound Manager

API Links
Developer Links

Sound::SetFadeProc

Defined in:  C4Sound.h
Installs a callback procedure which is invoked when a fade has ended for a sound.
Prototype

void SetFadeProc(FadeProc *proc, void *data = nullptr);

Parameters
proc The fade callback procedure. This parameter may be nullptr, in which case the sound has no fade callback procedure.
data The data which is passed to the fade callback procedure as its second parameter.
Description
The SetFaceProc function installs a callback procedure which is invoked every time that a fade operation completes for this particular sound. The FadeProc type is defined as

typedef void FadeProc(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 fade callback procedure installed.

If the proc parameter is set to nullptr, then no callback is made when fade operations complete for this sound.
See Also

Sound::Fade

Sound::Fading