shithub: aubio

Download patch

ref: 985d5c4d2d9004413b60fccf3f50fc508d66b2d9
parent: 691791ef37e9fef0b09c72c5c21bf7e1742c864d
author: Paul Brossier <piem@piem.org>
date: Mon Apr 25 13:42:35 EDT 2016

src/io/source_sndfile.c: approximate duration when resampling

--- a/src/io/source_sndfile.c
+++ b/src/io/source_sndfile.c
@@ -140,6 +140,7 @@
       AUBIO_WRN("source_sndfile: upsampling %s from %d to %d\n", s->path,
           s->input_samplerate, s->samplerate);
     }
+    s->duration = (uint_t)FLOOR(s->duration * s->ratio);
   }
 #else
   if (s->ratio != 1) {