diff options
Diffstat (limited to 'xtract')
-rw-r--r-- | xtract/libxtract.h | 5 | ||||
-rw-r--r-- | xtract/xtract_helper.h | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h index 8c20980..e7047de 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -71,7 +71,7 @@ extern "C" { * @{ */ -#define XTRACT_FEATURES 61 +#define XTRACT_FEATURES 62 /** \brief Enumeration of features, elements are used as indixes to an array of pointers to feature extracton functions */ enum xtract_features_ { @@ -137,7 +137,8 @@ enum xtract_features_ { XTRACT_LPCC, XTRACT_SUBBANDS, /* Helper functions */ - XTRACT_WINDOWED + XTRACT_WINDOWED, + XTRACT_SMOOTHED }; /** \brief Enumeration of feature initialisation functions */ diff --git a/xtract/xtract_helper.h b/xtract/xtract_helper.h index 9dabfbc..7296f0e 100644 --- a/xtract/xtract_helper.h +++ b/xtract/xtract_helper.h @@ -83,6 +83,20 @@ int xtract_is_denormal(double const d); /** \brief Test whether a number is a power of two */ bool xtract_is_poweroftwo(unsigned int x); + +/** \brief Smooth a vector + * + * \param *data a pointer to an array of doubles + * \param N the number of elements in the array pointed to by *data to be smoothed + * \param *argv a pointer to a double giving the smoothing gain + * \param *result a pointer to the first element an array containing the smoothed data + * + * \note if passing in a spectrum e.g. *result from xtract_spectrum(), then N for xtract_smoothed() should be N / 2 with respect to the N for xtract_spectrum() so only amplitude components are smoothed, not frequencies! + * + */ + int xtract_smoothed(const double *data, const int N, const void *argv, double *result); + + /** @} */ #ifdef __cplusplus |