aboutsummaryrefslogtreecommitdiff
path: root/xtract
diff options
context:
space:
mode:
Diffstat (limited to 'xtract')
-rw-r--r--xtract/libxtract.h13
-rw-r--r--xtract/xtract_delta.h2
-rw-r--r--xtract/xtract_vector.h2
3 files changed, 13 insertions, 4 deletions
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();
diff --git a/xtract/xtract_delta.h b/xtract/xtract_delta.h
index 9c6910a..706c812 100644
--- a/xtract/xtract_delta.h
+++ b/xtract/xtract_delta.h
@@ -47,8 +47,6 @@ int xtract_delta_feature(const float *data, const int N, const void *argv, float
/*xtract_frame_tracker *xf */
/*float frames*/
-
-
#ifdef __cplusplus
}
#endif
diff --git a/xtract/xtract_vector.h b/xtract/xtract_vector.h
index ad97f16..e67ae6d 100644
--- a/xtract/xtract_vector.h
+++ b/xtract/xtract_vector.h
@@ -38,7 +38,7 @@ extern "C" {
*
* \param *data: a pointer to the first element in an array of floats representing an audio vector
* \param N: the number of array elements to be considered
- * \param *argv: a pointer to an array of floats, the first representing (samplerate / N), the second will be cast to an integer and determines the spectrum type (e.g. XTRACT_MAGNITUDE_SPECTRUM, XTRACT_LOG_POWER_SPECTRUM). An optional third argument determines whether or not the DC component is included in the output. If argv[2] == 1, then the DC component is included in which case the size of the array pointed to by *result must be N+2. For any further use of the array pointed to by *result, the value of N must reflect the (larger) array size.
+ * \param *argv: a pointer to an array of floats, the first representing (samplerate / N), the second will be cast to an integer and determines the spectrum type (e.g. XTRACT_MAGNITUDE_SPECTRUM, XTRACT_LOG_POWER_SPECTRUM). The third argument determines whether or not the DC component is included in the output. If argv[2] == 1, then the DC component is included in which case the size of the array pointed to by *result must be N+2. For any further use of the array pointed to by *result, the value of N must reflect the (larger) array size.
* \param *result: a pointer to an array of size N containing N/2 magnitude/power/log magnitude/log power coefficients and N/2 bin frequencies.
*/
int xtract_spectrum(const float *data, const int N, const void *argv, float *result);