From 33916b8718563444fc6498083b41af0c0cf2bb78 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 7 Oct 2009 19:55:08 +0200 Subject: [PATCH] src/spectral/filterbank.{c,h}: add function to set coefficients --- src/spectral/filterbank.c | 7 +++++++ src/spectral/filterbank.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/spectral/filterbank.c b/src/spectral/filterbank.c index 50564b07..ac3d7e35 100644 --- a/src/spectral/filterbank.c +++ b/src/spectral/filterbank.c @@ -87,3 +87,10 @@ aubio_filterbank_get_coeffs (aubio_filterbank_t * f) { return f->filters; } + +uint_t +aubio_filterbank_set_coeffs (aubio_filterbank_t * f, fvec_t * filters) +{ + fvec_copy(filters, f->filters); + return 0; +} diff --git a/src/spectral/filterbank.h b/src/spectral/filterbank.h index 87da5c2c..02f6ff42 100644 --- a/src/spectral/filterbank.h +++ b/src/spectral/filterbank.h @@ -70,6 +70,13 @@ void aubio_filterbank_do (aubio_filterbank_t * fb, cvec_t * in, fvec_t * out); */ fvec_t *aubio_filterbank_get_coeffs (aubio_filterbank_t * f); +/** copy filter coefficients to the filterbank + + \param f filterbank object to get coefficients from + + */ +uint_t aubio_filterbank_set_coeffs (aubio_filterbank_t * f, fvec_t * filters); + #ifdef __cplusplus } #endif -- 2.26.2