diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2006-10-08 15:01:54 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2006-10-08 15:01:54 +0000 |
commit | 89803e1f2ff7a54f0c8a6283d9b9f96e62a35af2 (patch) | |
tree | 5bfe93f591ab05509ee18f5d988352dde71403aa /xtract/libxtract.h | |
parent | 67d61abd8be9314aa518fd6cd0b1684db8142e2e (diff) | |
download | LibXtract-89803e1f2ff7a54f0c8a6283d9b9f96e62a35af2.tar.gz LibXtract-89803e1f2ff7a54f0c8a6283d9b9f96e62a35af2.tar.bz2 LibXtract-89803e1f2ff7a54f0c8a6283d9b9f96e62a35af2.zip |
Tweaks to enable build on OS X
Diffstat (limited to 'xtract/libxtract.h')
-rw-r--r-- | xtract/libxtract.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h index 921eb4d..f1da9c1 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -38,7 +38,7 @@ extern "C" { #include "xtract_types.h" #include "xtract_macros.h" -#define XTRACT_FEATURES 41 +#define XTRACT_FEATURES 42 #define LOG_LIMIT 10e-10 #define VERY_BIG_NUMBER 2e10 #define SR_LIMIT 192000 @@ -74,7 +74,7 @@ enum features_ { SLOPE, LOWEST_MATCH, HPS, - F0, + F0, MAGNITUDE_SPECTRUM, AUTOCORRELATION, AUTOCORRELATION_FFT, @@ -136,10 +136,30 @@ enum return_codes_ { * All functions return an integer error code as descibed in the enumeration * return_codes_ * + * The preprocessor macro: XTRACT must be defined before this can be used + * * example:<br> - * xtract[PEAKS](amplitude_spectrum, 512, threshold, peaks) + * + * #include <stdio.h> + * #define XTRACT + * #include "libxtract.h" + * + * main () { + * float values[] = {1.0, 2.0, 3.0, 4.0, 5.0}; + * int N = 5; + * float mean; + * + * xtract[MEAN]((void *)values, N, NULL, &mean); + * + * printf("Mean = %.2f\n", mean); + * } + * + * The calling function may additionally make some tests against the value returned by xtract + * */ +#ifdef XTRACT int(*xtract[XTRACT_FEATURES])(float *data, int N, void *argv, float *result); +#endif /** \brief A structure to store a set of n_filters Mel filters */ typedef struct xtract_mel_filter_ { |