diff options
Diffstat (limited to 'xtract')
-rw-r--r-- | xtract/libxtract.h | 34 | ||||
-rw-r--r-- | xtract/xtract_delta.h | 18 | ||||
-rw-r--r-- | xtract/xtract_helper.h | 8 | ||||
-rw-r--r-- | xtract/xtract_scalar.h | 184 | ||||
-rw-r--r-- | xtract/xtract_types.h | 4 | ||||
-rw-r--r-- | xtract/xtract_vector.h | 50 |
6 files changed, 149 insertions, 149 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h index 94773c6..8082a47 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -32,12 +32,12 @@ * * All feature extraction functions follow the same prototype: * -int xtract_function_name(const float *data, const int N, const void *argv, float *result){ +int xtract_function_name(const double *data, const int N, const void *argv, double *result){ * - * \param const float *data points to an array of floats representing the input data + * \param const double *data points to an array of doubles representing the input data * \param const int N represents the number of elementes from *data to be considered in the calculation * \param const void *argv represents an arbitrary list of arguments. Used to pass in values required by the feature calculation - * \param float *result points to an array of floats, or a single float represnting the result of the calculation + * \param double *result points to an array of doubles, or a single double represnting the result of the calculation * * * It is up to the calling function to allocate enough memory for the *data, *argv, and *result, and to free it when required. Some feature extraction functions may also require an _init() function to be called in order to perform some initialisation. The struct xtract_function_descriptor_t is used to give an indication of recommended default values, and argc for the *argv array. @@ -282,9 +282,9 @@ typedef struct _xtract_function_descriptor { struct { xtract_type_t type; /* type of the array/value pointed to by argv */ - float min[XTRACT_MAXARGS]; - float max[XTRACT_MAXARGS]; - float def[XTRACT_MAXARGS]; /* defaults */ + double min[XTRACT_MAXARGS]; + double max[XTRACT_MAXARGS]; + double def[XTRACT_MAXARGS]; /* defaults */ xtract_unit_t unit[XTRACT_MAXARGS]; int donor[XTRACT_MAXARGS]; /* suggested donor functions for argv */ } argv; @@ -296,8 +296,8 @@ typedef struct _xtract_function_descriptor { union { struct { - float min; - float max; + double min; + double max; xtract_unit_t unit; } scalar; @@ -344,9 +344,9 @@ typedef struct _xtract_function_descriptor { #include "libxtract.h" main () { -float values[] = {1.0, 2.0, 3.0, 4.0, 5.0}; +double values[] = {1.0, 2.0, 3.0, 4.0, 5.0}; int N = 5; -float mean; +double mean; xtract[MEAN]((void *)values, N, NULL, &mean); @@ -357,21 +357,21 @@ printf("Mean = %.2f\n", mean); * */ #ifdef XTRACT_H -extern int(*xtract[XTRACT_FEATURES])(const float *data, const int N, const void *argv, float *result); +extern int(*xtract[XTRACT_FEATURES])(const double *data, const int N, const void *argv, double *result); #endif /** \brief A structure to store a set of n_filters Mel filters */ typedef struct xtract_mel_filter_ { int n_filters; - float **filters; + double **filters; } xtract_mel_filter; /** \brief A function to initialise a mel filter bank * * It is up to the caller to pass in a pointer to memory allocated for freq_bands arrays of length N. This function populates these arrays with magnitude coefficients representing the mel filterbank on a linear scale */ -int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq_max, int freq_bands, float **fft_tables); +int xtract_init_mfcc(int N, double nyquist, int style, double freq_min, double freq_max, int freq_bands, double **fft_tables); /** \brief A function to initialise bark filter bounds * @@ -381,7 +381,7 @@ int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq * \param sr: The sample audio sample rate * \param *band_limits: a pointer to an array of BARK_BANDS ints */ -int xtract_init_bark(int N, float sr, int *band_limits); +int xtract_init_bark(int N, double sr, int *band_limits); /** \brief An initialisation function for functions using FFT * @@ -406,14 +406,14 @@ void xtract_free_fft(void); * \param type: the type of the window as given in the enumeration window_types_ * */ -float *xtract_init_window(const int N, const int type); +double *xtract_init_window(const int N, const int type); /** \brief Free a window as allocated by xtract_make_window() * - * \param *window: a pointer to an array of floats as allocated by xtract_make_window() + * \param *window: a pointer to an array of doubles as allocated by xtract_make_window() * */ -void xtract_free_window(float *window); +void xtract_free_window(double *window); /* \brief A function to build an array of function descriptors */ xtract_function_descriptor_t *xtract_make_descriptors(); diff --git a/xtract/xtract_delta.h b/xtract/xtract_delta.h index c761699..9c0882c 100644 --- a/xtract/xtract_delta.h +++ b/xtract/xtract_delta.h @@ -45,25 +45,25 @@ extern "C" { * \note FIX: don't be lazy -- take the lnorm of the difference vector! * An alias for xtract_lnorm() */ -int xtract_flux(const float *data, const int N, const void *argv , float *result); +int xtract_flux(const double *data, const int N, const void *argv , double *result); /** \brief Extract the L-norm of a vector * - * \param *data: a pointer to the first element in an array of floats representing the difference between two subsequent frames of output from a vector-based feature e.g. the *result from xtract_difference_vector() + * \param *data: a pointer to the first element in an array of doubles representing the difference between two subsequent frames of output from a vector-based feature e.g. the *result from xtract_difference_vector() * \param N: the length of the array pointed to by *data - * \param *argv: a pointer to an array of floats, the first representing the "norm order". The second argument represents the filter type determining what values we consider from the difference vector as given in the enumeration xtract_lnorm_filter_types_ (libxtract.h) - * \param *result: a pointer to a float representing the flux + * \param *argv: a pointer to an array of doubles, the first representing the "norm order". The second argument represents the filter type determining what values we consider from the difference vector as given in the enumeration xtract_lnorm_filter_types_ (libxtract.h) + * \param *result: a pointer to a double representing the flux * */ -int xtract_lnorm(const float *data, const int N, const void *argv , float *result); +int xtract_lnorm(const double *data, const int N, const void *argv , double *result); /*xtract_frame_tracker *xf */ /** \brief Extract attack Time */ -int xtract_attack_time(const float *data, const int N, const void *argv , float *result); +int xtract_attack_time(const double *data, const int N, const void *argv , double *result); /* xtract_amp_tracker *xa */ /** Extract temporal decrease */ -int xtract_decay_time(const float *data, const int N, const void *argv, float *result); +int xtract_decay_time(const double *data, const int N, const void *argv, double *result); /* xtract_amp_tracker *xa */ @@ -75,9 +75,9 @@ int xtract_decay_time(const float *data, const int N, const void *argv, float *r * \param *result a pointer to an array of size N / 2 representing the difference between the two input vectors. * * */ -int xtract_difference_vector(const float *data, const int N, const void *argv, float *result); +int xtract_difference_vector(const double *data, const int N, const void *argv, double *result); /*xtract_frame_tracker *xf */ -/*float frames*/ +/*double frames*/ /** @} */ diff --git a/xtract/xtract_helper.h b/xtract/xtract_helper.h index 17bb23e..bc5b892 100644 --- a/xtract/xtract_helper.h +++ b/xtract/xtract_helper.h @@ -44,7 +44,7 @@ extern "C" { /** \brief Apply a window function to an array of length N * - * \param *data a pointer to an array of floats + * \param *data a pointer to an array of doubles * \param N the number of elements in the array pointed to by *data * \param *argv a pointer to a window function as returned by xtract_make_window() * \param *result a pointer to the first element an array containing the windowed data @@ -52,11 +52,11 @@ extern "C" { * It is up to the caller to generate and free the array containing the window, and to allocate and free memory of size N to hold the data pointed to by *result * */ -int xtract_windowed(const float *data, const int N, const void *argv, float *result); +int xtract_windowed(const double *data, const int N, const void *argv, double *result); /** \brief Divides the array pointed to by *data into two subframes, and applies a given feature to each subframe, returning them in a single array pointed to by result * - * \param *data an array of floats + * \param *data an array of doubles * \param N the number of elements in the array pointed by *data * \param feature an integer representing the feature to be applied to each subframe in data. This will be a value as given in the enumeration xtract_features_ (libxtract.h) * \param *argv a pointer to the argument vector to be passed to the feature extraction function as determined by feature @@ -66,7 +66,7 @@ int xtract_windowed(const float *data, const int N, const void *argv, float *res * It is important to ensure that any _init_*() functions that are called in preparation for functions that are called on subframes are given the subframe size as 'N', and not the frame size. i.e. if xtract_features_from_subframes() is called with N=64, and feature=XTRACT_SPECTRUM, then xtract_init_fft() should be called with N=32. * */ -int xtract_features_from_subframes(const float *data, const int N, const int feature, const void *argv, float *result); +int xtract_features_from_subframes(const double *data, const int N, const int feature, const void *argv, double *result); /** \brief Test whether a number is denormal */ int xtract_is_denormal(double const d); diff --git a/xtract/xtract_scalar.h b/xtract/xtract_scalar.h index 907d5fe..eee2df4 100644 --- a/xtract/xtract_scalar.h +++ b/xtract/xtract_scalar.h @@ -47,114 +47,114 @@ void test(void); * \param *argv: a pointer to NULL * \param *result: the mean of N values from the array pointed to by *data */ -int xtract_mean(const float *data, const int N, const void *argv, float *result); +int xtract_mean(const double *data, const int N, const void *argv, double *result); /** \brief Extract the variance of an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered - * \param *argv: a pointer to a float representing the mean of the input vector + * \param *argv: a pointer to a double representing the mean of the input vector * \param *result: the variance of N values from the array pointed to by *data */ -int xtract_variance(const float *data, const int N, const void *argv, float *result); +int xtract_variance(const double *data, const int N, const void *argv, double *result); /** \brief Extract the deviation of an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered - * \param *argv: a pointer to a float representing the variance of the input vector + * \param *argv: a pointer to a double representing the variance of the input vector * \param *result: the deviation of N values from the array pointed to by *data */ -int xtract_standard_deviation(const float *data, const int N, const void *argv, float *result); +int xtract_standard_deviation(const double *data, const int N, const void *argv, double *result); /** \brief Extract the average deviation of an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered - * \param *argv: a pointer to a float representing the mean of the input vector + * \param *argv: a pointer to a double representing the mean of the input vector * \param *result: the average deviation of N values from the array pointed to by *data */ -int xtract_average_deviation(const float *data, const int N, const void *argv, float *result); +int xtract_average_deviation(const double *data, const int N, const void *argv, double *result); /** \brief Extract the skewness of an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered - * \param *argv: a pointer to an array of floats representing the mean and standard deviation of the input vector + * \param *argv: a pointer to an array of doubles representing the mean and standard deviation of the input vector * \param *result: the skewness of N values from the array pointed to by *data */ -int xtract_skewness(const float *data, const int N, const void *argv, float *result); +int xtract_skewness(const double *data, const int N, const void *argv, double *result); /** \brief Extract the kurtosis of an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered * \param *argv: a pointer to an array of values representing the mean and standard deviation of the input vector * \param *result: the kurtosis of N values from the array pointed to by *data */ -int xtract_kurtosis(const float *data, const int N, const void *argv, float *result); +int xtract_kurtosis(const double *data, const int N, const void *argv, double *result); /** \brief Extract the mean of an input spectrum * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the size of the array pointed to by *data * \param *argv: a pointer to NULL * \param *result: the mean of the spectrum pointed to by *data */ -int xtract_spectral_mean(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_mean(const double *data, const int N, const void *argv, double *result); /** \brief Extract the variance of an input spectrum * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the number of elements to be considered * \param N: the size of the array pointed to by *data - * \param *argv: a pointer to a float representing the spectral mean of the input spectrum + * \param *argv: a pointer to a double representing the spectral mean of the input spectrum * \param *result: the variance of the spectrum pointed to by *data */ -int xtract_spectral_variance(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_variance(const double *data, const int N, const void *argv, double *result); /** \brief Extract the deviation of an input spectrum * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the size of the array pointed to by *data - * \param *argv: a pointer to a float representing the spectral variance of the input spectrum + * \param *argv: a pointer to a double representing the spectral variance of the input spectrum * \param *result: the deviation of the spectrum pointed to by *data */ -int xtract_spectral_standard_deviation(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_standard_deviation(const double *data, const int N, const void *argv, double *result); /** \brief Extract the average deviation of an input spectrum * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the size of the array pointed to by *data - * \param *argv: a pointer to a float representing the spectral mean of the input spectrum + * \param *argv: a pointer to a double representing the spectral mean of the input spectrum * \param *result: the average deviation of the spectrum pointed to by *data */ /* -int xtract_spectral_average_deviation(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_average_deviation(const double *data, const int N, const void *argv, double *result); */ /** \brief Extract the skewness of an input spectrum * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the size of the array pointed to by *data - * \param *argv: a pointer to an array of floats representing the spectral mean and spectral standard deviation of the input spectrum + * \param *argv: a pointer to an array of doubles representing the spectral mean and spectral standard deviation of the input spectrum * \param *result: the skewness of the spectrum pointed to by *data */ -int xtract_spectral_skewness(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_skewness(const double *data, const int N, const void *argv, double *result); /** \brief Extract the kurtosis of an input spectrum * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the size of the array pointed to by *data * \param *argv: a pointer to an array of values representing the spectral mean and spectral standard deviation of the input spectrum * \param *result: the kurtosis of the spectrum pointed to by *data */ -int xtract_spectral_kurtosis(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_kurtosis(const double *data, const int N, const void *argv, double *result); /** \brief Extract the centroid of an input vector * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the centroid of the values pointed to by *data @@ -162,29 +162,29 @@ int xtract_spectral_kurtosis(const float *data, const int N, const void *argv, * Note: for a more 'accurate' result *result from xtract_peak_spectrum() can be passed in. This gives the interpolated peak frequency locations. * */ -int xtract_spectral_centroid(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_centroid(const double *data, const int N, const void *argv, double *result); /** \brief Calculate the Irregularity of an input vector using a method described by Krimphoff (1994) * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the irregularity of N values from the array pointed to by *data */ -int xtract_irregularity_k(const float *data, const int N, const void *argv, float *result); +int xtract_irregularity_k(const double *data, const int N, const void *argv, double *result); /** \brief Calculate the Irregularity of an input vector using a method described by Jensen (1999) * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the irregularity of N values from the array pointed to by *data */ -int xtract_irregularity_j(const float *data, const int N, const void *argv, float *result); +int xtract_irregularity_j(const double *data, const int N, const void *argv, double *result); /** \brief Calculate the Tristimulus of an input vector using a method described by Pollard and Jansson (1982) * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients of the harmonic spectrum of an audio vector e.g. a pointer to the first half of the array pointed to by *result from xtract_harmonics(). The amplitudes of the peak spectrum (e.g. *result from xtract_peak_spectrum()) can be used if one wishes to consider all partials not just harmonics. + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients of the harmonic spectrum of an audio vector e.g. a pointer to the first half of the array pointed to by *result from xtract_harmonics(). The amplitudes of the peak spectrum (e.g. *result from xtract_peak_spectrum()) can be used if one wishes to consider all partials not just harmonics. * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the tristimulus of N values from the array pointed to by *data @@ -192,51 +192,51 @@ int xtract_irregularity_j(const float *data, const int N, const void *argv, floa * These three functions provide the first, second and third order tristimulus formulae * */ -int xtract_tristimulus_1(const float *data, const int N, const void *argv, float *result); -int xtract_tristimulus_2(const float *data, const int N, const void *argv, float *result); -int xtract_tristimulus_3(const float *data, const int N, const void *argv, float *result); +int xtract_tristimulus_1(const double *data, const int N, const void *argv, double *result); +int xtract_tristimulus_2(const double *data, const int N, const void *argv, double *result); +int xtract_tristimulus_3(const double *data, const int N, const void *argv, double *result); /** \brief Extract the smoothness of an input vector using a method described by McAdams (1999) * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered * \param *argv: a pointer to the first element of an array of integers containing the lower bound, upper bound, and pre-scaling factor, whereby array data in the range lower < n < upper will be pre-scaled by p before processing. * \param *result: the smoothness of N values from the array pointed to by *data */ -int xtract_smoothness(const float *data, const int N, const void *argv, float *result); +int xtract_smoothness(const double *data, const int N, const void *argv, double *result); /** \brief Extract the spectral spread of an input vector using a method described by Casagrande(2005) * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered - * \param *argv: a pointer to a float corresponding to the spectral centroid + * \param *argv: a pointer to a double corresponding to the spectral centroid * \param *result: the spectral spread of N values from the array pointed to by *data */ -int xtract_spread(const float *data, const int N, const void *argv, float *result); +int xtract_spread(const double *data, const int N, const void *argv, double *result); /* Zero crossing rate */ /** \brief Extract the zero crossing rate of an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the zero crossing rate of N values from the array pointed to by *data */ -int xtract_zcr(const float *data, const int N, const void *argv, float *result); +int xtract_zcr(const double *data, const int N, const void *argv, double *result); /** \brief Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005) * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered - * \param *argv: a pointer to an array containing a float representing (samplerate / N ) and a float representing the threshold for rolloff, i.e. the percentile at which the rolloff is determined, expressed as a percentage, and + * \param *argv: a pointer to an array containing a double representing (samplerate / N ) and a double representing the threshold for rolloff, i.e. the percentile at which the rolloff is determined, expressed as a percentage, and * \param *result: the spectral rolloff in Hz of N values from the array pointed to by *data. This is the point in the spectrum below which argv[0] of the energy is distributed. */ -int xtract_rolloff(const float *data, const int N, const void *argv, float *result); +int xtract_rolloff(const double *data, const int N, const void *argv, double *result); /** \brief Extract the 'total loudness' of an input vector using a method described by Moore, Glasberg et al (2005) * - * \param *data: a pointer to the first element in an array of floats representing a set of BARK_BANDS bark coefficients + * \param *data: a pointer to the first element in an array of doubles representing a set of BARK_BANDS bark coefficients * \param N: the number of coefficients to be considered * \param *argv: a pointer to NULL * \param *result: the total loudness of N values from the array pointed to by *data @@ -244,30 +244,30 @@ int xtract_rolloff(const float *data, const int N, const void *argv, float *resu * Note: if N = 1, the 'specific loudness' of the bark band pointed to by *data will be given by *result * */ -int xtract_loudness(const float *data, const int N, const void *argv, float *result); +int xtract_loudness(const double *data, const int N, const void *argv, double *result); /** \brief Extract the spectral flatness measure of an input vector, where the flatness measure (SFM) is defined as the ratio of the geometric mean to the arithmetic mean of a magnitude spectrum. * * \note The computation method used here is the most efficient by a significant margin, but suffers from precision problems due to the multiplication operationin the geometric mean calculation. This is particularly accute for larger values of N (>=256). However, as noted by Peeters (2003), the SFM should generally be computed on a small number of 'bands' rather than on the complete magnitude spectrum. It is therefore highly recommended that xtract_bands() is used prior to calling xtract_flatness(). * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). Alternatively the magnitudes from a number of 'subbands' can be used by using *result from xtract_bands(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). Alternatively the magnitudes from a number of 'subbands' can be used by using *result from xtract_bands(). * \param N: the number of *data array elements to be considered * \param *argv: a pointer to NULL * \param *result: the flatness of N values from the array pointed to by *data */ -int xtract_flatness(const float *data, const int N, const void *argv, float *result); +int xtract_flatness(const double *data, const int N, const void *argv, double *result); /** \brief Extract the LOG spectral flatness measure of an input vector * * \param *data: a pointer to NULL. * \param N: not used - can safely be set to 0. - * \param *argv: a pointer to a float represnting spectral flatness. + * \param *argv: a pointer to a double represnting spectral flatness. * \param *result: the LOG spectral flatness of N values from the array pointed to by *data * * flatness_db = 10 * log10(flatness) * */ -int xtract_flatness_db(const float *data, const int N, const void *argv, float *result); +int xtract_flatness_db(const double *data, const int N, const void *argv, double *result); /** \brief Extract the tonality factor of an input vector using a method described by Peeters 2003 * @@ -276,127 +276,127 @@ int xtract_flatness_db(const float *data, const int N, const void *argv, float * * \param *argv: a pointer to the LOG spectral flatness measure of an audio vector (e.g. the output from xtract_flatness_db) * \param *result: the tonality factor of N values from the array pointed to by *data */ -int xtract_tonality(const float *data, const int N, const void *argv, float *result); +int xtract_tonality(const double *data, const int N, const void *argv, double *result); /** \brief Extract the noisiness of an input vector using a method described by Tae Hong Park (2000) * * \param *data: a pointer to NULL * \param N: - * \param *argv: a pointer to an array containing a float represnting the number of harmonic partials in a spectrum, and a float representing the number of partials in a spectrum + * \param *argv: a pointer to an array containing a double represnting the number of harmonic partials in a spectrum, and a double representing the number of partials in a spectrum * \param *result: the noisiness coefficient as calculated from argv */ -int xtract_noisiness(const float *data, const int N, const void *argv, float *result); +int xtract_noisiness(const double *data, const int N, const void *argv, double *result); /** \brief Extract the RMS amplitude of an input vector using a method described by Tae Hong Park (2000) * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the RMS amplitude of N values from the array pointed to by *data */ -int xtract_rms_amplitude(const float *data, const int N, const void *argv, float *result); +int xtract_rms_amplitude(const double *data, const int N, const void *argv, double *result); /** \brief Extract the Inharmonicity of an input vector * - * \param *data: a pointer to the first element in an array of floats represeting a magnitude peak spectrum of size N/2, and a frequency spectrum of size N/2 (This is the output format of xtract_peak_spectrum()) + * \param *data: a pointer to the first element in an array of doubles represeting a magnitude peak spectrum of size N/2, and a frequency spectrum of size N/2 (This is the output format of xtract_peak_spectrum()) * \param N: the number of elements to be considered - * \param *argv: a pointer to a float representing the fundamental frequency of the input vector. + * \param *argv: a pointer to a double representing the fundamental frequency of the input vector. * \param *result: the inharmonicity of N values from the array pointed to by *data */ -int xtract_spectral_inharmonicity(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_inharmonicity(const double *data, const int N, const void *argv, double *result); /** \brief Extract the spectral crest of an input vector using a method described by Peeters (2003) * * \param *data: a pointer to NULL * \param N: not used - * \param *argv: a pointer to an array containing a float representing the maximum value in a spectrum, and a float representing the mean value of a spectrum + * \param *argv: a pointer to an array containing a double representing the maximum value in a spectrum, and a double representing the mean value of a spectrum * \param *result: the spectral crest of N values from the array pointed to by *data */ -int xtract_crest(const float *data, const int N, const void *argv, float *result); +int xtract_crest(const double *data, const int N, const void *argv, double *result); /** \brief Extract the Spectral Power of an input vector using a method described by Bee Suan Ong (2005) * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the spectral power of N values from the array pointed to by *data */ -int xtract_power(const float *data, const int N, const void *argv, float *result); +int xtract_power(const double *data, const int N, const void *argv, double *result); /* Odd to even harmonic ratio */ /** \brief Extract the Odd to even harmonic ratio of an input vector * - * \param *data: a pointer to the first element in an array of floats representing the amplitudes of the harmonic spectrum of an audio vector. It is sufficient to pass in a pointer to the first half of the array pointed to by *result from xtract_harmonic_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the amplitudes of the harmonic spectrum of an audio vector. It is sufficient to pass in a pointer to the first half of the array pointed to by *result from xtract_harmonic_spectrum(). * \param N: the number of elements to be considered. If using the array pointed to by *result from xtract_harmonics, N should equal half the total array size i.e., just the amplitudes of the peaks. * \param *argv: a pointer to NULL * \param *result: the even/odd harmonic ratio of N values from the array pointed to by *data */ -int xtract_odd_even_ratio(const float *data, const int N, const void *argv, float *result); +int xtract_odd_even_ratio(const double *data, const int N, const void *argv, double *result); /** \brief Extract the Sharpness of an input vector * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the Sharpness of N values from the array pointed to by *data */ -int xtract_sharpness(const float *data, const int N, const void *argv, float *result); +int xtract_sharpness(const double *data, const int N, const void *argv, double *result); /** \brief Extract the Slope of an input vector using a method described by Peeters(2003) * - * \param *data: a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). + * \param *data: a pointer to the first element in an array of doubles representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the Slope of N values from the array pointed to by *data */ -int xtract_spectral_slope(const float *data, const int N, const void *argv, float *result); +int xtract_spectral_slope(const double *data, const int N, const void *argv, double *result); /** \brief Extract the value of the lowest value in an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered - * \param *argv: a pointer to a float representing the lower limit for the search. i.e. (*result > *argv) returns 1. + * \param *argv: a pointer to a double representing the lower limit for the search. i.e. (*result > *argv) returns 1. * \param *result: a pointer to a value representing the lowest component in *data that falls above a given threshold. * */ -int xtract_lowest_value(const float *data, const int N, const void *argv, float *result); +int xtract_lowest_value(const double *data, const int N, const void *argv, double *result); /** \brief Extract the value of the highest value in an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered * \param *argv: a pointer to NULL. * \param *result: a pointer to a value representing the highest component in *data. * */ -int xtract_highest_value(const float *data, const int N, const void *argv, float *result); +int xtract_highest_value(const double *data, const int N, const void *argv, double *result); /** \brief Extract the sum of the values in an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered * \param *argv: a pointer to NULL. * \param *result: a pointer to a value representing the sum of all of the values pointed to by *data. * */ -int xtract_sum(const float *data, const int N, const void *argv, float *result); +int xtract_sum(const double *data, const int N, const void *argv, double *result); /** \brief Extract the Pitch of an input vector using Harmonic Product Spectrum (HPS) analysis * * \warning {This function doesn't work properly} * - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements to be considered * \param *argv: a pointer to NULL * \param *result: the pitch of N values from the array pointed to by *data */ -int xtract_hps(const float *data, const int N, const void *argv, float *result); +int xtract_hps(const double *data, const int N, const void *argv, double *result); /** \brief Extract the fundamental frequency of an input vector * - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles representing an audio vector * \param N: the number of elements to be considered - * \param *argv: a pointer to a float representing the audio sample rate + * \param *argv: a pointer to a double representing the audio sample rate * \param *result: the pitch of N values from the array pointed to by *data * * This algorithm is based on the AMDF, with peak and centre clipping. It would benefit from further improvements to improve noise robustness and overall efficiency @@ -404,29 +404,29 @@ int xtract_hps(const float *data, const int N, const void *argv, float *result); * It is based on suggestion by Robert Bristow-Johnson in a discussion on the comp.dsp mailing list, subject "Reference implementation of pitch detection" * */ -int xtract_f0(const float *data, const int N, const void *argv, float *result); +int xtract_f0(const double *data, const int N, const void *argv, double *result); /** \brief Extract the fundamental frequency of an input vector * - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles representing an audio vector * \param N: the number of elements to be considered - * \param *argv: a pointer to a float representing the audio sample rate + * \param *argv: a pointer to a double representing the audio sample rate * \param *result: the pitch of N values from the array pointed to by *data * * This function wraps xtract_f0, but provides the frequency of the lowest partial in the peak spectrum if f0 can't be found. * */ -int xtract_failsafe_f0(const float *data, const int N, const void *argv, float *result); +int xtract_failsafe_f0(const double *data, const int N, const void *argv, double *result); /** \brief Extract the number of non-zero elements in an input vector * - * \param *data: a pointer to the first element in an array of floats + * \param *data: a pointer to the first element in an array of doubles * \param N: the number of elements to be considered * \param *argv: not used * \param *result: the number of non-zero elements in the array pointed to by *data * */ -int xtract_nonzero_count(const float *data, const int N, const void *argv, float *result); +int xtract_nonzero_count(const double *data, const int N, const void *argv, double *result); /** @} */ diff --git a/xtract/xtract_types.h b/xtract/xtract_types.h index 6c22e18..fe75b6e 100644 --- a/xtract/xtract_types.h +++ b/xtract/xtract_types.h @@ -33,12 +33,12 @@ extern "C" { /* \brief Data structure used to store amplitude data between calls to xtract_attack_time and other functions. */ typedef struct _xtract_amp_tracker { int count; - float previous_amp; + double previous_amp; } xtract_amp_tracker; typedef struct _xtract_frame_tracker { int frame_count; - float *previous_frame; + double *previous_frame; } xtract_frame_tracker; #ifdef __cplusplus diff --git a/xtract/xtract_vector.h b/xtract/xtract_vector.h index 35ef6d0..f935da6 100644 --- a/xtract/xtract_vector.h +++ b/xtract/xtract_vector.h @@ -40,9 +40,9 @@ extern "C" { /** \brief Extract frequency domain spectrum from time domain signal * - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles 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). 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. The fourth argument determines whether the magnitude/power coefficients are to be normalised. If argv[3] == 1, then the coefficients are normalised. + * \param *argv: a pointer to an array of doubles, 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. The fourth argument determines whether the magnitude/power coefficients are to be normalised. If argv[3] == 1, then the coefficients are normalised. * \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. * * The magnitude/power coefficients are scaled to the range 0-1 so that for a given coefficient x, 0 <= x <= 1 @@ -50,16 +50,16 @@ extern "C" { * \note Before calling xtract_spectrum(), the FFT must be initialised by calling xtract_init_fft(N, XTRACT_SPECTRUM) * */ -int xtract_spectrum(const float *data, const int N, const void *argv, float *result); +int xtract_spectrum(const double *data, const int N, const void *argv, double *result); /** \brief Extract autocorrelation from time domain signal using FFT based method * - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles representing an audio vector * \param N: the number of array elements to be considered * \param *argv: a pointer to NULL * \param *result: the autocorrelation of N values from the array pointed to by *data */ -int xtract_autocorrelation_fft(const float *data, const int N, const void *argv, float *result); +int xtract_autocorrelation_fft(const double *data, const int N, const void *argv, double *result); /** \brief Extract Mel Frequency Cepstral Coefficients based on a method described by Rabiner * @@ -70,45 +70,45 @@ int xtract_autocorrelation_fft(const float *data, const int N, const void *argv, * * The data structure pointed to by *argv must be obtained by first calling xtract_init_mfcc */ -int xtract_mfcc(const float *data, const int N, const void *argv, float *result); +int xtract_mfcc(const double *data, const int N, const void *argv, double *result); /** \brief Extract the Discrete Cosine transform of a time domain signal - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles representing an audio vector * \param N: the number of array elements to be considered * \param *argv: a pointer to NULL * \param *result: a pointer to an array containing resultant dct coefficients */ -int xtract_dct(const float *data, const int N, const void *argv, float *result); +int xtract_dct(const double *data, const int N, const void *argv, double *result); /** \brief Extract autocorrelation from time domain signal using time-domain autocorrelation technique * - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles representing an audio vector * \param N: the number of array elements to be considered * \param *argv: a pointer to NULL * \param *result: the autocorrelation of N values from the array pointed to by *data */ -int xtract_autocorrelation(const float *data, const int N, const void *argv, float *result); +int xtract_autocorrelation(const double *data, const int N, const void *argv, double *result); /** \brief Extract Average Magnitude Difference Function from time domain signal * - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles representing an audio vector * \param N: the number of array elements to be considered * \param *argv: a pointer to NULL * \param *result: the AMDF of N values from the array pointed to by *data */ -int xtract_amdf(const float *data, const int N, const void *argv, float *result); +int xtract_amdf(const double *data, const int N, const void *argv, double *result); /** \brief Extract Average Squared Difference Function from time domain signal * - * \param *data: a pointer to the first element in an array of floats representing an audio vector + * \param *data: a pointer to the first element in an array of doubles representing an audio vector * \param N: the number of array elements to be considered * \param *argv: a pointer to NULL * \param *result: the ASDF of N values from the array pointed to by *data */ -int xtract_asdf(const float *data, const int N, const void *argv, float *result); +int xtract_asdf(const double *data, const int N, const void *argv, double *result); /** \brief Extract Bark band coefficients based on a method - * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the magnitude spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). + * \param *data: a pointer to the first element in an array of doubles representing the magnitude coefficients from the magnitude spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of array elements to be considered * \param *argv: a pointer to an array of ints representing the limits of each bark band. This can be obtained by calling xtract_init_bark. * \param *result: a pointer to an array containing resultant bark coefficients @@ -116,24 +116,24 @@ int xtract_asdf(const float *data, const int N, const void *argv, float *result) * The limits array pointed to by *argv must be obtained by first calling xtract_init_bark * */ -int xtract_bark_coefficients(const float *data, const int N, const void *argv, float *result); +int xtract_bark_coefficients(const double *data, const int N, const void *argv, double *result); /** \brief Extract the amplitude and frequency of spectral peaks from a magnitude spectrum * \param *data: a pointer to an array of size N containing N magnitude/power/log magnitude/log power coefficients. (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the size of the input array (note: it is assumed that enough memory has been allocated for an output array twice the size) - * \param *argv: a pointer to an array of floats, the first representing (samplerate / N), the second representing the peak threshold as percentage of the magnitude of the maximum peak found + * \param *argv: a pointer to an array of doubles, the first representing (samplerate / N), the second representing the peak threshold as percentage of the magnitude of the maximum peak found * \param *result: a pointer to an array of size N * 2 containing N magnitude/power/log magnitude/log power coefficients and N bin frequencies. * */ -int xtract_peak_spectrum(const float *data, const int N, const void *argv, float *result); +int xtract_peak_spectrum(const double *data, const int N, const void *argv, double *result); /** \brief Extract the harmonic spectrum of from a of a peak spectrum - * \param *data: a pointer to the first element in an array of floats representing the peak spectrum of an audio vector (e.g. *result from xtract_peaks). It is expected that the first half of the array pointed to by *data will contain amplitudes for each peak considered, and the the second half will contain the respective frequencies + * \param *data: a pointer to the first element in an array of doubles representing the peak spectrum of an audio vector (e.g. *result from xtract_peaks). It is expected that the first half of the array pointed to by *data will contain amplitudes for each peak considered, and the the second half will contain the respective frequencies * \param N: the size of the array pointed to by *data * \param *argv: a pointer to an array containing the fundamental (f0) of the spectrum, and a threshold (t) where 0<=t<=1.0, and t determines the distance from the nearest harmonic number within which a partial can be considered harmonic. * \param *result: a pointer to an array of size N containing N/2 magnitude coefficients and N/2 bin frequencies. */ -int xtract_harmonic_spectrum(const float *data, const int N, const void *argv, float *result); +int xtract_harmonic_spectrum(const double *data, const int N, const void *argv, double *result); /** \brief Extract Linear Predictive Coding Coefficients * @@ -148,26 +148,26 @@ int xtract_harmonic_spectrum(const float *data, const int N, const void *argv, f * * An array of size 2 * (N - 1) must be allocated, and *result must point to its first element. */ -int xtract_lpc(const float *data, const int N, const void *argv, float *result); +int xtract_lpc(const double *data, const int N, const void *argv, double *result); /** \brief Extract Linear Predictive Coding Cepstral Coefficients * * \param *data: a pointer to the first element in an array of LPC coeffiecients e.g. a pointer to the second half of the array pointed to by *result from xtract_lpc() * \param N: the number of LPC coefficients to be considered - * \param *argv: a pointer to a float representing the order of the result vector. This must be a whole number. According to Rabiner and Juang the ratio between the number (p) of LPC coefficients and the order (Q) of the LPC cepstrum is given by Q ~ (3/2)p where Q > p. + * \param *argv: a pointer to a double representing the order of the result vector. This must be a whole number. According to Rabiner and Juang the ratio between the number (p) of LPC coefficients and the order (Q) of the LPC cepstrum is given by Q ~ (3/2)p where Q > p. * \param *result: a pointer to an array containing the resultant LPCC. * * An array of size Q, where Q is given by argv[0] must be allocated, and *result must point to its first element. * */ -int xtract_lpcc(const float *data, const int N, const void *argv, float *result); +int xtract_lpcc(const double *data, const int N, const void *argv, double *result); /** \brief Extract subbands from a spectrum * * \param *data: a pointer to an array of size N containing N magnitude/power/log magnitude/log power coefficients. (e.g. the first half of the array pointed to by *result from xtract_spectrum(). * \param N: the number of elements from the array pointed to by *data to be considered * \param *argv: A pointer to an array containing four integers. The first represents the extraction function to applied to each subband e.g. XTRACT_SUM or XTRACT_MEAN, the second represents the number of subbands required, and the third represents the frequency scale to be used for the subband bounds as defined in the enumeration xtract_subband_scales_ (libxtract.h). The fourth integer represent the start point of the subbands as a location in the input array as pointed to by *data (e.g. a value of 5 would start the subband extraction at bin 5) - * \param *result: A pointer to an array containing the resultant subband values. The calling function is responsible for allocating and freeing memory for *result. xtract_subbands() assumes that at least argv[1] * sizeof(float) bytes have been allocated. If the requested nbands extends the subband range beyond N, then the remaining bands will be set to 0. If the array pointed to by *result has more than argv[1] elements, the superfluous elements will be unchanged. + * \param *result: A pointer to an array containing the resultant subband values. The calling function is responsible for allocating and freeing memory for *result. xtract_subbands() assumes that at least argv[1] * sizeof(double) bytes have been allocated. If the requested nbands extends the subband range beyond N, then the remaining bands will be set to 0. If the array pointed to by *result has more than argv[1] elements, the superfluous elements will be unchanged. * * xtract_subbands() divides a spectrum into subbands and applies the function given by argv[0] to the values in each subband to give a 'reduced' representation of the spectrum as *result * @@ -178,7 +178,7 @@ int xtract_lpcc(const float *data, const int N, const void *argv, float *result) * It is assumed that a sensible function will be given in argv[0], and for this function argv will always be NULL. Sensible values for argv[0] are XTRACT_MEAN and XTRACT_SUM, although something like XTRACT_IRREGULARITY_K might yield interesting results. * */ -int xtract_subbands(const float *data, const int N, const void *argv, float *result); +int xtract_subbands(const double *data, const int N, const void *argv, double *result); /** @} */ #ifdef __cplusplus |