src/cvec.c: add cvec_print
authorPaul Brossier <piem@piem.org>
Mon, 21 Sep 2009 16:17:02 +0000 (18:17 +0200)
committerPaul Brossier <piem@piem.org>
Mon, 21 Sep 2009 16:17:02 +0000 (18:17 +0200)
src/cvec.c
src/cvec.h

index 74840db..195ccae 100644 (file)
@@ -80,3 +80,21 @@ smpl_t ** cvec_get_phas(cvec_t *s) {
   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");
+  }
+}
+
index 1029d89..13ca3e3 100644 (file)
@@ -180,6 +180,13 @@ smpl_t ** cvec_get_norm(cvec_t *s);
 */
 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