SoundBankObject
Generated from engine/audio/sound_bank_object.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/audio/sound_bank_object.h" · namespace labrador
class SoundBankObject
Section titled “class SoundBankObject”Anything that makes noise, inherited for the plumbing: it holds the bank handle and forwards the calls, so a subclass writes play_wave(x) instead of audio_resources->sound_bank(handle)->play_wave(x).
Names go in at construction and handles come out; the play calls take handles only. A subclass therefore resolves what it can make a noise with once, in its constructor, and keeps the handles as members - which is why the resolve helpers are here and the name-taking play calls are not.
SoundBankObject
Section titled “SoundBankObject”A subclass that has not been given an AudioResources, which every object drawn by this engine has to be capable of being: draw objects are default-constructible. Nothing can fill the table in afterwards - set_sound_bank changes which bank, not which table it comes out of - so an object built this way is permanently unusable, and both ways of touching it throw std::logic_error saying so. That is T6 rather than a null dereference in somebody else's frame.
SoundBankObject
Section titled “SoundBankObject”Throws std::out_of_range naming the bank if nothing loaded it, and std::logic_error for a null table.
sound_bank (protected)
Section titled “sound_bank (protected)”resolve_wave · resolve_effect (protected)
Section titled “resolve_wave · resolve_effect (protected)”Load-time. Each throws std::out_of_range naming what was asked for if the bank does not have it, so a misspelt sound fails while the menu is being built rather than staying silent on the press that wanted it.
play_wave · play_effect · stop_effect · pause_effect · resume_effect · set_effect_volume · set_effect_pitch · set_effect_pan · effect_state · is_effect_looping (protected)
Section titled “play_wave · play_effect · stop_effect · pause_effect · resume_effect · set_effect_volume · set_effect_pitch · set_effect_pan · effect_state · is_effect_looping (protected)” float volume = 1.0f, float pitch = 0.0f, float pan = 0.0f) const; bool loop = false, float volume = 1.0f, float pitch = 0.0f, float pan = 0.0f) const;void stop_effect(SoundBank::EffectHandle effect, bool immediate = false) const;void pause_effect(SoundBank::EffectHandle effect) const;void resume_effect(SoundBank::EffectHandle effect) const;void set_effect_volume(SoundBank::EffectHandle effect, float volume) const;void set_effect_pitch(SoundBank::EffectHandle effect, float pitch) const;void set_effect_pan(SoundBank::EffectHandle effect, float pan) const;bool is_effect_looping(SoundBank::EffectHandle effect) const;set_sound_bank (protected)
Section titled “set_sound_bank (protected)”void set_sound_bank(const std::string& sound_bank_name);Points this object at a different bank. Every handle resolved from the old one is meaningless against the new one, so a caller doing this re-resolves everything it holds.
Related types
Section titled “Related types”Named in the public declarations above: AudioResources, SoundBank, SoundState.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
tests/audio/sound_bank_object_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.