CL_SoundBuffer_Session provides control over a playing soundeffect.
Description
Whenever a soundbuffer is played, it returns a CL_SoundBuffer_Session
class, which can be used to control the sound (its volume, pitch,
pan, position). It can of course also be used to retrigger the sound
or to stop it. The soundeffect is stored in the layer1 soundmanager
until all references to the sound played are removed, meaning that
the soundeffect (session) will be ready to play and remember its
state and settings (volume, frequency...) until no CL_SoundBuffer_Session
refers to it, via a soundbuffer session reference system.
Class members
CL_SoundBuffer_Session()
CL_SoundBuffer_Session(
void *handle,
CL_SoundCard *_card)
CL_SoundBuffer_Session(const CL_SoundBuffer_Session ©)
~CL_SoundBuffer_Session()
CL_SoundBuffer_Session& operator=(const CL_SoundBuffer_Session &session)
void *get_handle()
CL_SoundCard *get_card()
int get_position()
float get_position_relative()
bool set_position(int new_pos)
bool set_position_relative(float new_pos)
int get_length()
int get_frequency()
bool set_frequency(int new_freq)
float get_volume()
bool set_volume(float new_volume)
float get_pan()
bool set_pan(float new_pan)
void play()
void stop()
bool is_playing()
void set_looping(bool loop)
void add_filter(
class CL_SoundFilter *filter,
bool delete_filter = false)
void remove_filter(class CL_SoundFilter *filter)
See Also
None
Back to index
|