pulsatrix
Loading...
Searching...
No Matches
pulsatrix::WavReader Class Reference

Reads uncompressed 16-bit PCM WAV files directly – pulsatrix's first audio primitive (campaign_exai_dl_library_data_pipeline, Phase 4, Decision Point 4: hand-rolled over libsndfile, same "narrowest thing that satisfies the exit gate" reasoning as Decision Points 1/2/6). More...

#include <wav_reader.hpp>

Static Public Member Functions

static WavData Load (const std::string &path, DeviceBackend *backend)
 

Detailed Description

Reads uncompressed 16-bit PCM WAV files directly – pulsatrix's first audio primitive (campaign_exai_dl_library_data_pipeline, Phase 4, Decision Point 4: hand-rolled over libsndfile, same "narrowest thing that satisfies the exit gate" reasoning as Decision Points 1/2/6).

Note
Assumes the canonical fixed-order RIFF/WAVE/fmt/data chunk layout (no support for extra chunks like LIST/INFO before the data chunk) – a real, documented limitation, matching MnistIdxLoader's own fixed-header-layout precedent rather than a general chunk scanner.

Member Function Documentation

◆ Load()

static WavData pulsatrix::WavReader::Load ( const std::string &  path,
DeviceBackend *  backend 
)
static
Parameters
pathPath to a WAV file.
backendBackend to allocate the output waveform Tensor through. Not owned.
Returns
The decoded waveform and its sample rate.
Exceptions
std::runtime_errorif the file can't be opened, isn't a valid RIFF/WAVE file, isn't PCM, isn't 16-bit, or is shorter than its own declared data size – external boundary (file content, not an internal invariant).

The documentation for this class was generated from the following file: