From: Paul Brossier Date: Mon, 28 Nov 2016 17:48:03 +0000 (+0100) Subject: src/io/source_sndfile.c: add missing floor in ratio comparison X-Git-Tag: 0.4.4~134 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=cad7e919e0dd16239faab02aff7fd67837e98797;p=aubio.git src/io/source_sndfile.c: add missing floor in ratio comparison --- diff --git a/src/io/source_sndfile.c b/src/io/source_sndfile.c index 133a02f1..5f3817d3 100644 --- a/src/io/source_sndfile.c +++ b/src/io/source_sndfile.c @@ -140,7 +140,7 @@ aubio_source_sndfile_t * new_aubio_source_sndfile(const char_t * path, uint_t sa } if (s->ratio > 1) { // we would need to add a ring buffer for these - if ( (uint_t)(s->input_hop_size * s->ratio + .5) != s->hop_size ) { + if ( (uint_t)FLOOR(s->input_hop_size * s->ratio + .5) != s->hop_size ) { AUBIO_ERR("source_sndfile: can not upsample %s from %d to %d\n", s->path, s->input_samplerate, s->samplerate); goto beach;