comparison src/fini.c @ 110:c8502708853b

- Improvements to SWIG bindings generation script - Fixed omission in xtract_bark_coefficients that was causing the output to be complete b/s! This fixed bark_coeffs and loudness feature which depends on it - Changes to descriptor API: added is_delta and id. id corresponds to value in xtract_features_ enum and is useful for programmatic conversions between id and name string.
author Jamie Bullock <jamie@postlude.co.uk>
date Tue, 01 Jan 2008 16:17:44 +0000
parents 7a5859764ccd
children 67f6b6e63d45
comparison
equal deleted inserted replaced
109:9518ae6afff4 110:c8502708853b
20 20
21 /* fini.c: Contains library destructor routine */ 21 /* fini.c: Contains library destructor routine */
22 22
23 #ifdef XTRACT_FFT 23 #ifdef XTRACT_FFT
24 #include <fftw3.h> 24 #include <fftw3.h>
25 #include "xtract_globals_private.h" 25 //#include "xtract_globals_private.h"
26 #include "xtract/libxtract.h"
26 #endif 27 #endif
27 28
28 #ifdef __GNUC__ 29 #ifdef __GNUC__
29 __attribute__((destructor)) void fini() 30 __attribute__((destructor)) void fini()
30 #else 31 #else
31 void _fini() 32 void _fini()
32 #endif 33 #endif
33 { 34 {
34 #ifdef XTRACT_FFT 35 #ifdef XTRACT_FFT
35 if(fft_plans.spectrum_plan != NULL) 36 xtract_free_fft();
36 fftwf_destroy_plan(fft_plans.spectrum_plan); 37 fftwf_cleanup();
37 if(fft_plans.autocorrelation_fft_plan_1 != NULL)
38 fftwf_destroy_plan(fft_plans.autocorrelation_fft_plan_1);
39 if(fft_plans.autocorrelation_fft_plan_2 != NULL)
40 fftwf_destroy_plan(fft_plans.autocorrelation_fft_plan_2);
41 if(fft_plans.dct_plan != NULL)
42 fftwf_destroy_plan(fft_plans.dct_plan);
43 fftwf_cleanup();
44 #endif 38 #endif
45 } 39 }
46 40
47 41
48 42