10 EFOPEN
= ERR_GROUP(8), // fopen failed
11 EFREAD
, // fread failed
12 EFORMAT
, // invalid file format
13 EWAVE_EOF
, // read beyond the end of the wave file
26 struct waveformat format
;
27 long length
; // length, in samples
28 off_t pcm_start
; // file offset to start of actual audio data
31 err_t
wavefile_open(struct wavefile
*wav
, const char *filename
);
32 err_t
wavefile_read_at(struct wavefile
*wav
, off_t sample_start
, void *buf
, size_t n_samples
);