X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/281d0fd48965b973ca69a432b2a9bf0152ae9023..c0f84b88cab9518d29900e02a9fb67776820e902:/lib/wav.c diff --git a/lib/wav.c b/lib/wav.c index 8b2d640..fe7ffbb 100644 --- a/lib/wav.c +++ b/lib/wav.c @@ -129,7 +129,7 @@ int wav_init(struct wavfile *f, const char *path) { 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 @@ -196,7 +196,8 @@ error: } /** @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