Skip to content

Commit

Permalink
src/io/source_wavread.c: also exit if samplerate is negative (closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
piem committed Aug 6, 2018
1 parent 25f280f commit 99c7aa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io/source_wavread.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ aubio_source_wavread_t * new_aubio_source_wavread(const char_t * path, uint_t sa
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;
}

Expand Down

0 comments on commit 99c7aa2

Please sign in to comment.