src/spectral/filterbank.{c,h}: add function to set coefficients
authorPaul Brossier <piem@piem.org>
Wed, 7 Oct 2009 17:55:08 +0000 (19:55 +0200)
committerPaul Brossier <piem@piem.org>
Wed, 7 Oct 2009 17:55:08 +0000 (19:55 +0200)
src/spectral/filterbank.c
src/spectral/filterbank.h

index 50564b07f33c90487801044d6058a385b34ff34c..ac3d7e35804fa4d3a4f36d0f91f4452e35ed0c80 100644 (file)
@@ -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;
+}
index 87da5c2c3b646e808bc13f0c546b8947f6497cee..02f6ff423dc7fdf117522c50dbb1de0177260761 100644 (file)
@@ -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