C4 Engine
C4 Engine API Documentation

Sound::GetSoundState

Defined in:  C4Sound.h
Returns a sound's current state.
Prototype

SoundState GetSoundState(voidconst;

Description
The GetSoundState function returns a sound state code which indicates the whether the sound is stopped, playing, paused, etc. The code returned can be one of the following constants.
kSoundUnloaded The sound is not loaded.
kSoundStopping The sound is in the process of stopping.
kSoundStopped The sound is stopped.
kSoundDelaying The sound is waiting for a delay period to pass before it plays. This state is only set when the Sound::DelaySound function is called, and not as a result of the kSoundDistanceDelay flag being set.
kSoundPlaying The sound is playing.
kSoundPaused The sound is paused.
kSoundDelayPaused The sound is paused while waiting for a delay period to pass before it plays.
kSoundCompleted The sound has completed, but the completion callback function has not yet been called.
Upon construction, a sound object's initial state is kSoundUnloaded. After a successful call to the Sound::LoadSound function, the sound object's state is kSoundStopped.
See Also

Sound::PlaySound

Sound::StopSound

Sound::PauseSound

Sound::ResumeSound

Sound::DelaySound