goto beach;
}
- if (s->path) AUBIO_FREE(s->path);
s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX) + 1);
strncpy(s->path, path, strnlen(path, PATH_MAX) + 1);
goto beach;
}
- if ( sr == 0 ) {
- AUBIO_ERR("source_wavread: Failed opening %s (samplerate can not be 0)\n", s->path);
+ if ( (sint_t)sr <= 0 ) {
+ AUBIO_ERR("source_wavread: Failed opening %s (samplerate can not be <= 0)\n", s->path);
goto beach;
}
}
void del_aubio_source_wavread(aubio_source_wavread_t * s) {
- if (!s) return;
+ AUBIO_ASSERT(s);
aubio_source_wavread_close(s);
if (s->short_output) AUBIO_FREE(s->short_output);
if (s->output) del_fmat(s->output);