Home | All Classes | Grouped Classes | Index | Search

Class CL_SoundBuffer_Session

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

Derived from: none
Derived by: none
Group: Sound (Audio Mixing)

#include <ClanLib/sound.h>

Construction:

CL_SoundBuffer_Session

Creates a soundbuffer session.

Attributes:

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_speedfactor

Returns the current speedfactor.

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_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

set_speedfactor

Sets the speedfactor of the session.

play

Starts playback of the session.

stop

Stops playback of the session.

rewind

Rewinds the session so playback will start from the beginning.

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.

remove_all_filters

Removes all filters from the session.

Detailed description:

!group=Sound/Audio Mixing! !header=sound.h!

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.



Questions or comments, write to the
ClanLib mailing list.