Mercurial > hg > libxtract
comparison xtract/libxtract.h @ 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 | e6354b0137d3 |
children | 72a9a393d5bd |
comparison
equal
deleted
inserted
replaced
109:9518ae6afff4 | 110:c8502708853b |
---|---|
247 } xtract_vector_t; | 247 } xtract_vector_t; |
248 | 248 |
249 /** \brief Data structure containing useful information about functions provided by LibXtract. */ | 249 /** \brief Data structure containing useful information about functions provided by LibXtract. */ |
250 typedef struct _xtract_function_descriptor { | 250 typedef struct _xtract_function_descriptor { |
251 | 251 |
252 int id; | |
253 | |
252 struct { | 254 struct { |
253 char name[XTRACT_MAX_NAME_LENGTH]; | 255 char name[XTRACT_MAX_NAME_LENGTH]; |
254 char p_name[XTRACT_MAX_NAME_LENGTH]; /* pretty name */ | 256 char p_name[XTRACT_MAX_NAME_LENGTH]; /* pretty name */ |
255 char desc[XTRACT_MAX_DESC_LENGTH]; | 257 char desc[XTRACT_MAX_DESC_LENGTH]; |
256 char p_desc[XTRACT_MAX_DESC_LENGTH]; /* pretty description */ | 258 char p_desc[XTRACT_MAX_DESC_LENGTH]; /* pretty description */ |
377 * e.g. XTRACT_DCT | 379 * e.g. XTRACT_DCT |
378 * | 380 * |
379 */ | 381 */ |
380 int xtract_init_fft(int N, int feature_name); | 382 int xtract_init_fft(int N, int feature_name); |
381 | 383 |
384 /** \brief Free memory used for fft plans | |
385 * | |
386 * This function should be used to explicitly free memory allocated for ffts by xtract_init_fft(). It is primarily intended for use if a new FFT needs to be taken with a different blocksize. If only one fft size is required then there is no need to call this function since it will be called when the program exits. | |
387 * */ | |
388 void xtract_free_fft(void); | |
389 | |
382 /** \brief Make a window of a given type and return a pointer to it | 390 /** \brief Make a window of a given type and return a pointer to it |
383 * | 391 * |
384 * \param N: the size of the window | 392 * \param N: the size of the window |
385 * \param type: the type of the window as given in the enumeration window_types_ | 393 * \param type: the type of the window as given in the enumeration window_types_ |
386 * | 394 * |
393 * | 401 * |
394 */ | 402 */ |
395 void xtract_free_window(float *window); | 403 void xtract_free_window(float *window); |
396 | 404 |
397 /* \brief A function to build an array of function descriptors */ | 405 /* \brief A function to build an array of function descriptors */ |
398 void *xtract_make_descriptors(); | 406 xtract_function_descriptor_t *xtract_make_descriptors(); |
399 | 407 |
400 /* \brief A function to free an array of function descriptors */ | 408 /* \brief A function to free an array of function descriptors */ |
401 int xtract_free_descriptors(void *fd); | 409 int xtract_free_descriptors(xtract_function_descriptor_t *fd); |
402 /* Free functions */ | 410 /* Free functions */ |
403 | 411 |
404 /** @} */ | 412 /** @} */ |
405 | 413 |
406 #ifdef __cplusplus | 414 #ifdef __cplusplus |