shithub: aubio

Download patch

ref: 55b7cb426abe737882c4a16342187d9528b960ef
parent: d53a3b571cd8b545b3bba1d08868f8522894484d
author: Paul Brossier <piem@piem.org>
date: Mon Sep 21 14:17:02 EDT 2009

src/cvec.c: add cvec_print

--- a/src/cvec.c
+++ b/src/cvec.c
@@ -80,3 +80,21 @@
   return s->phas;
 }
 
+/* helper functions */
+
+void cvec_print(cvec_t *s) {
+  uint_t i,j;
+  for (i=0; i< s->channels; i++) {
+    AUBIO_MSG("norm: ");
+    for (j=0; j< s->length; j++) {
+      AUBIO_MSG(AUBIO_SMPL_FMT " ", s->norm[i][j]);
+    }
+    AUBIO_MSG("\n");
+    AUBIO_MSG("phas: ");
+    for (j=0; j< s->length; j++) {
+      AUBIO_MSG(AUBIO_SMPL_FMT " ", s->phas[i][j]);
+    }
+    AUBIO_MSG("\n");
+  }
+}
+
--- a/src/cvec.h
+++ b/src/cvec.h
@@ -180,6 +180,13 @@
 */
 smpl_t ** cvec_get_phas(cvec_t *s);
 
+/** print out cvec data 
+
+  \param s vector to print out 
+
+*/
+void cvec_print(cvec_t *s);
+
 #ifdef __cplusplus
 }
 #endif