comparison xtract/libxtract.h @ 108:e6354b0137d3

- PD example brought in line with new delta features and subframe function - subframe-test.pd added - fix to a_blockswap~.pd
author Jamie Bullock <jamie@postlude.co.uk>
date Sat, 29 Dec 2007 17:33:17 +0000
parents 3e648eec95cb
children c8502708853b
comparison
equal deleted inserted replaced
107:3e648eec95cb 108:e6354b0137d3
66 * 66 *
67 * Defines a very simple API that provides access to the functions in the library 67 * Defines a very simple API that provides access to the functions in the library
68 * @{ 68 * @{
69 */ 69 */
70 70
71 #define XTRACT_FEATURES 58 71 #define XTRACT_FEATURES 59
72 72
73 /** \brief Enumeration of features, elements are used as indixes to an array of pointers to feature extracton functions */ 73 /** \brief Enumeration of features, elements are used as indixes to an array of pointers to feature extracton functions */
74 enum xtract_features_ { 74 enum xtract_features_ {
75 XTRACT_MEAN, 75 XTRACT_MEAN,
76 XTRACT_VARIANCE, 76 XTRACT_VARIANCE,
134 }; 134 };
135 135
136 /** \brief Enumeration of feature initialisation functions */ 136 /** \brief Enumeration of feature initialisation functions */
137 enum xtract_feature_init_ { 137 enum xtract_feature_init_ {
138 XTRACT_INIT_MFCC = 100, 138 XTRACT_INIT_MFCC = 100,
139 XTRACT_INIT_BARK 139 XTRACT_INIT_BARK,
140 XTRACT_INIT_WINDOWED
140 }; 141 };
141 142
142 /** \brief Enumeration of feature types */ 143 /** \brief Enumeration of feature types */
143 enum xtract_feature_types_ { 144 enum xtract_feature_types_ {
144 XTRACT_SCALAR, 145 XTRACT_SCALAR,
151 XTRACT_EQUAL_GAIN, 152 XTRACT_EQUAL_GAIN,
152 XTRACT_EQUAL_AREA 153 XTRACT_EQUAL_AREA
153 }; 154 };
154 155
155 enum xtract_lnorm_filter_types_ { 156 enum xtract_lnorm_filter_types_ {
157 XTRACT_NO_LNORM_FILTER,
156 XTRACT_POSITIVE_SLOPE, 158 XTRACT_POSITIVE_SLOPE,
157 XTRACT_NEGATIVE_SLOPE 159 XTRACT_NEGATIVE_SLOPE
158 }; 160 };
159 161
160 /** \brief Enumeration of return codes */ 162 /** \brief Enumeration of return codes */
238 XTRACT_AUDIO_SAMPLES, 240 XTRACT_AUDIO_SAMPLES,
239 XTRACT_MEL_COEFFS, 241 XTRACT_MEL_COEFFS,
240 XTRACT_LPC_COEFFS, 242 XTRACT_LPC_COEFFS,
241 XTRACT_LPCC_COEFFS, 243 XTRACT_LPCC_COEFFS,
242 XTRACT_BARK_COEFFS, 244 XTRACT_BARK_COEFFS,
245 XTRACT_SUBFRAMES,
243 XTRACT_NO_DATA 246 XTRACT_NO_DATA
244 } xtract_vector_t; 247 } xtract_vector_t;
245 248
246 /** \brief Data structure containing useful information about functions provided by LibXtract. */ 249 /** \brief Data structure containing useful information about functions provided by LibXtract. */
247 typedef struct _xtract_function_descriptor { 250 typedef struct _xtract_function_descriptor {
270 xtract_unit_t unit[XTRACT_MAXARGS]; 273 xtract_unit_t unit[XTRACT_MAXARGS];
271 int donor[XTRACT_MAXARGS]; /* suggested donor functions for argv */ 274 int donor[XTRACT_MAXARGS]; /* suggested donor functions for argv */
272 } argv; 275 } argv;
273 276
274 xtract_bool_t is_scalar; 277 xtract_bool_t is_scalar;
278 xtract_bool_t is_delta; /* features in xtract_delta.h can be scalar or vector */
275 279
276 /* The result.<> entries in descritors.c need to be checked */ 280 /* The result.<> entries in descritors.c need to be checked */
277 union { 281 union {
278 282
279 struct { 283 struct {