From 7044486fdcc4d806f46c35ec4787ae48fa26c369 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Sat, 6 Oct 2007 16:36:00 +0000 Subject: Removed fftw_plan from xtraction functions. Created new init function xtract_init_fft() for creating plans, which have global scope. Updated examples to reflect the change. New configure option: --with-fft_optimisation (0 = FFTW_ESTIMATE, 1 = FFTW_MEASURE, 2 = FFTW_PATIENT). --- xtract/libxtract.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'xtract/libxtract.h') diff --git a/xtract/libxtract.h b/xtract/libxtract.h index af69758..e967372 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -261,7 +261,7 @@ typedef struct _xtract_function_descriptor { * * \param N: the number of elements to be processed * - * \param *argv: an abitrary number of additional arguments, used to pass additional parameters to the function being called + * \param *argv: an abitrary number of additional arguments, used to pass additional parameters to the function being called. All arguments are compulsary! * * \param *result: a pointer to the first element in the result * @@ -326,6 +326,17 @@ int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq */ int xtract_init_bark(int N, float sr, int *band_limits); +/** \brief An initialisation function for functions using FFT + * + * This function initialises global data structures used by functions requiring FFT functionality. It can be called multiple times with different feature names. Calling it more than once with the same feature name is not a valid operation and will result in a memory leak. + * + * \param N: the size of the FFT + * \param feature_name: the name of the feature the FFT is being used for, + * e.g. XTRACT_DCT + * + */ +int xtract_init_fft(int N, int feature_name); + /* \brief A function to build an array of function descriptors */ void *xtract_make_descriptors(); -- cgit v1.2.3