/* Minimal RIFF/WAVE reader for the command line tool: uncompressed 16-bit PCM * only. Multichannel input is downmixed by averaging every channel. The * library itself never touches files. */ #ifndef VIX_WAV_H #define VIX_WAV_H #include #include typedef struct { int16_t *samples; /* mono, averaged across source channels */ size_t count; int sample_rate; int channels; } wav_t; /* Returns 0 on success. On failure returns non-zero and, when err is * non-NULL, writes a short reason there. */ int wav_read_mono_s16(const char *path, wav_t *out, const char **err); void wav_free(wav_t *w); #endif