bn::sound_handle class

Sound effect handle.

Public functions

auto id() const -> int
Returns the internal id.
auto active() const -> bool
Indicates if this sound effect is active or not.
auto item() const -> sound_item
Returns the sound_item of this sound effect.
void stop()
Stops playback of this sound effect.
void release()
Releases this sound effect, allowing its interruption.
auto speed() const -> fixed
Returns the playback rate of this sound effect.
void set_speed(fixed speed)
Sets the playback rate of this sound effect.
auto panning() const -> fixed
Returns the panning level of this sound effect.
void set_panning(fixed panning)
Sets the panning level of this sound effect.

Function documentation

void bn::sound_handle::set_speed(fixed speed)

Sets the playback rate of this sound effect.

Parameters
speed Playback rate, in the range [0..64].

void bn::sound_handle::set_panning(fixed panning)

Sets the panning level of this sound effect.

Parameters
panning Panning level, in the range [-1..1].