ref: 2d128dafb33d3724aef11a383d6220c856c5fb49
parent: 0ae2eb84833f47f5e32a123e10fa1fe4f39f8168
author: Paul Brossier <piem@piem.org>
date: Sun Sep 18 08:54:10 EDT 2016
src/effects/pitchshift.h: add aubio_pitchshift_get_latency
--- a/src/effects/pitchshift.c
+++ b/src/effects/pitchshift.c
@@ -97,6 +97,10 @@
AUBIO_FREE (p);
}
+uint_t aubio_pitchshift_get_latency (aubio_pitchshift_t * p) {+ return rubberband_get_latency(p->rb);
+}
+
uint_t
aubio_pitchshift_set_pitchscale (aubio_pitchshift_t * p, smpl_t pitchscale)
{@@ -185,6 +189,10 @@
}
smpl_t aubio_pitchshift_get_transpose (aubio_pitchshift_t * o UNUSED) {+ return 0.;
+}
+
+uint_t aubio_pitchshift_get_latency (aubio_pitchshift_t * o UNUSED) {return 0.;
}
--- a/src/effects/pitchshift.h
+++ b/src/effects/pitchshift.h
@@ -67,6 +67,15 @@
aubio_pitchshift_t *new_aubio_pitchshift (const char_t * method,
smpl_t pitchscale, uint_t hop_size, uint_t samplerate);
+/** get the latency of the pitch shifting object, in samples
+
+ \param o pitch shifting object as returned by ::new_aubio_pitchshift()
+
+ \return latency of the pitch shifting object in samples
+
+*/
+uint_t aubio_pitchshift_get_latency (aubio_pitchshift_t * o);
+
/** set the pitch scale of the pitch shifting object
\param o pitch shifting object as returned by new_aubio_pitchshift()
--
⑨