42 class SoundBuffer_Session_Impl;
189 std::shared_ptr<SoundBuffer_Session_Impl> impl;
int get_length() const
Returns the total length (in samples) of the sound buffer played.
bool is_null() const
Returns true if this object is invalid.
Definition: soundbuffer_session.h:68
bool set_end_position(int pos)
Sets the end position within the current stream.
Sample interface in ClanLib.
Definition: soundbuffer.h:57
bool set_position_relative(float new_pos)
Sets the relative position of the session.
float get_pan() const
Returns the current pan (in a measure from -1 -> 1).
float get_volume() const
Returns the linear relative volume of the soundeffect.
void add_filter(SoundFilter &filter)
Adds the sound filter to the session. See SoundFilter for details.
void stop()
Stops playback of the session.
Sound Filter Class.
Definition: soundfilter.h:45
void set_pan(float new_pan)
Sets the panning of the session played in measures from -1 -> 1.
void set_volume(float new_volume)
Sets the volume of the session in a relative measure (0->1)
bool set_position(int new_pos)
Sets the session position to 'new_pos'.
bool get_looping() const
Returns whether this session loops.
SoundBuffer_Session()
Creates a null instance.
SoundBuffer_Session provides control over a playing soundeffect.
Definition: soundbuffer_session.h:52
void play()
Starts playback of the session.
void set_frequency(int new_freq)
Sets the frequency of the session.
friend class SoundOutput_Impl
Definition: soundbuffer_session.h:192
bool is_playing()
Returns true if the session is playing.
SoundOutput interface in ClanLib.
Definition: soundoutput.h:49
virtual ~SoundBuffer_Session()
void set_looping(bool loop)
Determines whether this session should loop.
void remove_filter(SoundFilter &filter)
Remove the sound filter from the session. See SoundFilter for details.
int get_position() const
Returns the current sample position of the playback.
float get_position_relative() const
Returns the sample position relative to the full length.
void throw_if_null() const
Throw an exception if this object is invalid.
int get_frequency() const
Returns the frequency of the session.