From: Paul Brossier Date: Mon, 21 Sep 2009 16:17:02 +0000 (+0200) Subject: src/cvec.c: add cvec_print X-Git-Tag: bzr2git~333 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=55b7cb426abe737882c4a16342187d9528b960ef;p=aubio.git src/cvec.c: add cvec_print --- diff --git a/src/cvec.c b/src/cvec.c index 74840dbb..195ccae5 100644 --- a/src/cvec.c +++ b/src/cvec.c @@ -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"); + } +} + diff --git a/src/cvec.h b/src/cvec.h index 1029d89f..13ca3e34 100644 --- a/src/cvec.h +++ b/src/cvec.h @@ -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