Owned PCM wave data
Generated from engine/audio/wave_data.h at aceb130. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
Audience: game code.
#include "engine/audio/wave_data.h" · namespace labrador
enum class WaveEncoding
Section titled “enum class WaveEncoding”{ pcm8, pcm16, adpcm};The source encoding before decoding. Samples below are signed 16-bit PCM whatever this says; the value preserves their provenance.
struct WaveData
Section titled “struct WaveData”One owned wave, decoded to signed 16-bit PCM.
std::string name;A name used to resolve this wave in a memory bank. A reader may leave it empty when the source format carries no name.
encoding
Section titled “encoding”channels
Section titled “channels”int channels = 0;sample_rate
Section titled “sample_rate”int sample_rate = 0;loop_start
Section titled “loop_start”uint32_t loop_start = 0;loop_length
Section titled “loop_length”uint32_t loop_length = 0;Frames, not individual interleaved samples. A zero length means no region: loop_start is ignored and a looping voice loops the whole wave. Otherwise it plays from the start, then repeats this region.
samples
Section titled “samples”std::vector<int16_t> samples;Interleaved: a frame is channels consecutive samples.
frames
Section titled “frames”size_t frames() const;struct WaveBankData
Section titled “struct WaveBankData”An owned bank and its waves in resolution order.
std::string name;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/wave_data_tests.cpptests/audio/webaudio/webaudio_tests.cpp
Explained in
Section titled “Explained in”Development documentation (unreleased). Built from Labrador aceb130 of 2026-11-20.