From cad7e919e0dd16239faab02aff7fd67837e98797 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 28 Nov 2016 18:48:03 +0100 Subject: [PATCH] src/io/source_sndfile.c: add missing floor in ratio comparison --- src/io/source_sndfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0