ref: 06baeb26af03646235eb02334006219966443fa8
parent: e0b852a377750cc5a47340f42da4d85cce1048a5
author: Paul Brossier <piem@piem.org>
date: Wed Aug 8 12:49:13 EDT 2018
src/spectral/dct_fftw.c: rename to aubio_dct_fftw
--- a/src/spectral/dct_fftw.c
+++ b/src/spectral/dct_fftw.c
@@ -51,7 +51,9 @@
// defined in src/spectral/fft.c
extern pthread_mutex_t aubio_fftw_mutex;
-struct _aubio_dct_t {
+typedef struct _aubio_dct_fftw_t aubio_dct_fftw_t;
+
+struct _aubio_dct_fftw_t {
uint_t size;
fvec_t *in, *out;
smpl_t *data;
@@ -59,8 +61,8 @@
smpl_t scalers[5];
};
-aubio_dct_t * new_aubio_dct (uint_t size) {
- aubio_dct_t * s = AUBIO_NEW(aubio_dct_t);
+aubio_dct_fftw_t * new_aubio_dct_fftw (uint_t size) {
+ aubio_dct_fftw_t * s = AUBIO_NEW(aubio_dct_fftw_t);
if (!s) {
goto beach;
}
@@ -85,7 +87,7 @@
return NULL;
}
-void del_aubio_dct(aubio_dct_t *s) {
+void del_aubio_dct_fftw(aubio_dct_fftw_t *s) {
pthread_mutex_lock(&aubio_fftw_mutex);
fftw_destroy_plan(s->pfw);
fftw_destroy_plan(s->pbw);
@@ -96,7 +98,7 @@
AUBIO_FREE(s);
}
-void aubio_dct_do(aubio_dct_t *s, const fvec_t *input, fvec_t *output) {
+void aubio_dct_fftw_do(aubio_dct_fftw_t *s, const fvec_t *input, fvec_t *output) {
uint_t i;
fvec_copy(input, s->in);
fftw_execute(s->pfw);
@@ -108,7 +110,7 @@
memcpy(output->data, s->data, output->length * sizeof(smpl_t));
}
-void aubio_dct_rdo(aubio_dct_t *s, const fvec_t *input, fvec_t *output) {
+void aubio_dct_fftw_rdo(aubio_dct_fftw_t *s, const fvec_t *input, fvec_t *output) {
uint_t i;
memcpy(s->data, input->data, input->length * sizeof(smpl_t));
//s->data[0] *= .5;