summaryrefslogtreecommitdiff
path: root/tests/src/pitch/test-pitchfcomb.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/pitch/test-pitchfcomb.c')
-rw-r--r--tests/src/pitch/test-pitchfcomb.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/src/pitch/test-pitchfcomb.c b/tests/src/pitch/test-pitchfcomb.c
new file mode 100644
index 0000000..718537b
--- /dev/null
+++ b/tests/src/pitch/test-pitchfcomb.c
@@ -0,0 +1,29 @@
+#define AUBIO_UNSTABLE 1
+
+// this file uses the unstable aubio api, please use aubio_pitch instead
+// see src/pitch/pitch.h and tests/src/pitch/test-pitch.c
+
+#include <aubio.h>
+
+int main (void)
+{
+ uint_t i = 0;
+ uint_t win_s = 1024; // window size
+ uint_t hop_s = win_s/4; // hop size
+ // create some vectors
+ fvec_t * in = new_fvec (hop_s); // input buffer
+ fvec_t * out = new_fvec (1); // output candidates
+ // create pitch object
+ aubio_pitchfcomb_t * o = new_aubio_pitchfcomb ( win_s, hop_s);
+
+ while (i < 10) {
+ aubio_pitchfcomb_do (o,in, out);
+ i++;
+ };
+
+ del_aubio_pitchfcomb(o);
+ del_fvec(out);
+ del_fvec(in);
+ aubio_cleanup();
+ return 0;
+}