Esc

Reader

structextensionexperimentalsince 0.36.1Source
  • macOS: Reader works on macOS
  • Linux: Reader works on Linux
  • Windows: Reader works on Windows
  • Wasm: Reader works on Wasm

Declaration

Reader :: struct {
    file: File;    opened: bool;    vorbis: *V.stb_vorbis;    channels: s32;    rate: s32;    frames: s64;    position: s64;    artist: string;    album: string;    title: string;    format: W.Waveformatex;    extra: W.Wave_Extra_Info;    offset: s64;    block: [] u8;    decoded: [] s16;    cached_block: s64 = -1;}

An open decoder. Keep it on one thread, close it before reuse, and do not copy it. position and frames count frames, not individual interleaved channel samples.