comparison xtract/libxtract.h @ 38:0ea4d6430cfc

Implemented xtract_harmonics
author Jamie Bullock <jamie@postlude.co.uk>
date Sat, 09 Dec 2006 15:21:35 +0000
parents d8e72a79b86b
children 4a36f70a76e9
comparison
equal deleted inserted replaced
37:b699a37d27c4 38:0ea4d6430cfc
51 * 51 *
52 * Defines a very simple API that provides access to the functions in the library 52 * Defines a very simple API that provides access to the functions in the library
53 * @{ 53 * @{
54 */ 54 */
55 55
56 #define XTRACT_FEATURES 43 56 #define XTRACT_FEATURES 44
57 57
58 #define LOG_LIMIT 10e-10 58 #define LOG_LIMIT 10e-10
59 #define VERY_BIG_NUMBER 2e10 59 #define VERY_BIG_NUMBER 2e10
60 #define SR_LIMIT 192000 60 #define SR_LIMIT 192000
61 #define BARK_BANDS 26 61 #define BARK_BANDS 26
102 BARK_COEFFICIENTS, 102 BARK_COEFFICIENTS,
103 PEAKS, 103 PEAKS,
104 MAGNITUDE_SPECTRUM, 104 MAGNITUDE_SPECTRUM,
105 AUTOCORRELATION_FFT, 105 AUTOCORRELATION_FFT,
106 MFCC, 106 MFCC,
107 DCT 107 DCT,
108 HARMONICS
108 }; 109 };
109 110
110 /** \brief Enumeration of feature types */ 111 /** \brief Enumeration of feature types */
111 enum feature_types_ { 112 enum feature_types_ {
112 SCALAR, 113 SCALAR,
124 enum return_codes_ { 125 enum return_codes_ {
125 SUCCESS, 126 SUCCESS,
126 MALLOC_FAILED, 127 MALLOC_FAILED,
127 BAD_ARGV, 128 BAD_ARGV,
128 BAD_VECTOR_SIZE, 129 BAD_VECTOR_SIZE,
129 NO_RESULT 130 NO_RESULT,
131 FEATURE_NOT_IMPLEMENTED
130 }; 132 };
131 133
132 /** 134 /**
133 * 135 *
134 * \brief An array of pointers to functions that perform the extraction 136 * \brief An array of pointers to functions that perform the extraction
176 * 178 *
177 */ 179 */
178 #ifdef XTRACT 180 #ifdef XTRACT
179 extern int(*xtract[XTRACT_FEATURES])(float *data, int N, void *argv, float *result); 181 extern int(*xtract[XTRACT_FEATURES])(float *data, int N, void *argv, float *result);
180 182
181
182 /** \brief An array of pointers to function help strings 183 /** \brief An array of pointers to function help strings
183 * 184 *
184 * Defined in libxtract.c. As a minimum this will contain pointers to the names of all of the feature extraction functions in the library. This is intended as a 'quick reference' to be queried as necessary. 185 * Defined in libxtract.c. As a minimum this will contain pointers to the names of all of the feature extraction functions in the library. This is intended as a 'quick reference' to be queried as necessary.
185 */ 186 */
186 extern char *xtract_help_strings[XTRACT_FEATURES]; 187 extern char *xtract_help_strings[XTRACT_FEATURES];
188
189 /** \brief An array of pointers to strings giving function output units
190 *
191 * Defined in libxtract.c. This contains pointers to strings giving the output units of all of the feature extraction functions in the library. This is intended as a 'quick reference' to be queried as necessary.
192 */
193 extern char *xtract_units[XTRACT_FEATURES];
194
187 #endif 195 #endif
188 196
189 /** \brief A structure to store a set of n_filters Mel filters */ 197 /** \brief A structure to store a set of n_filters Mel filters */
190 typedef struct xtract_mel_filter_ { 198 typedef struct xtract_mel_filter_ {
191 int n_filters; 199 int n_filters;