All Classes |Grouped Classes |Index

Class CL_SoundBuffer_Session

CL_SoundBuffer_Session provides control over a playing soundeffect. More...

Derived from:

None

Derived by:

None

Group:

Audio Mixing (Sound)

#include <ClanLib/sound.h>

Class Members:

Construction:

CL_SoundBuffer_Session

Creates a null instance.


Attributes:

is_null

Returns true if this object is invalid.

throw_if_null

Throw an exception if this object is invalid.

get_position

Returns the current sample position of the playback.

get_position_relative

Returns the sample position relative to the full length.

get_length

Returns the total length (in samples) of the sound buffer played.

get_frequency

Returns the frequency of the session.

get_volume

Returns the linear relative volume of the soundeffect.

get_pan

Returns the current pan (in a measure from -1 -> 1).

get_looping

Returns whether this session loops.

is_playing

Returns true if the session is playing.


Operations:

set_position

Sets the session position to 'new_pos'.

set_position_relative

Sets the relative position of the session.

set_end_position

Sets the end position within the current stream.

set_frequency

Sets the frequency of the session.

set_volume

Sets the volume of the session in a relative measure (0->1)

set_pan

Sets the panning of the session played in measures from -1 -> 1.

play

Starts playback of the session.

stop

Stops playback of the session.

set_looping

Determines whether this session should loop.

add_filter

Adds the sound filter to the session. See CL_SoundFilter for details.

remove_filter

Remove the sound filter from the session. See CL_SoundFilter for details.

Detailed 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 also be used to retrigger the sound or to stop it.