memset(f, 0, sizeof *f);
f->data = -1;
- hreader_init(path, f->input);
+ if(hreader_init(path, f->input)) goto error_errno;
/* Read the file header
*
* offset size meaning
}
/** @brief Close a WAV file */
-void wav_destroy(struct wavfile attribute((unused)) *f) {
+void wav_destroy(struct wavfile *f) {
+ hreader_close(f->input);
}
/** @brief Visit all the data in a WAV file