aboutsummaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/init.c b/src/init.c
index 6112e73..6e544af 100644
--- a/src/init.c
+++ b/src/init.c
@@ -203,6 +203,18 @@ int xtract_init_fft(int N, int feature_name){
}
+void xtract_free_fft(void){
+ if(fft_plans.spectrum_plan != NULL)
+ fftwf_destroy_plan(fft_plans.spectrum_plan);
+ if(fft_plans.autocorrelation_fft_plan_1 != NULL)
+ fftwf_destroy_plan(fft_plans.autocorrelation_fft_plan_1);
+ if(fft_plans.autocorrelation_fft_plan_2 != NULL)
+ fftwf_destroy_plan(fft_plans.autocorrelation_fft_plan_2);
+ if(fft_plans.dct_plan != NULL)
+ fftwf_destroy_plan(fft_plans.dct_plan);
+// fftwf_cleanup();
+}
+
#endif
int xtract_init_bark(int N, float sr, int *band_limits){