aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--src/scalar.c5
-rw-r--r--xtract/libxtract.h3
-rw-r--r--xtract/xtract_scalar.h4
-rw-r--r--xtract/xtract_vector.h4
5 files changed, 12 insertions, 5 deletions
diff --git a/TODO b/TODO
index a4ebf76..b167e1f 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+Add -fPIC in intelligent way to build system for 64-bit builds
Rationalise use of powf etc. vs pow
Add spectral_flux
Add geometric_mean
diff --git a/src/scalar.c b/src/scalar.c
index 6732422..708c45c 100644
--- a/src/scalar.c
+++ b/src/scalar.c
@@ -350,7 +350,10 @@ int xtract_spread(const float *data, const int N, const void *argv, float *resul
int n = N;
- float num = 0.f, den = 0.f, temp;
+ float num = 0.f, den = 0.f, temp = 0.f;
+
+ if(argv == NULL)
+ return XTRACT_BAD_ARGV;
while(n--){
temp = n - *(float *)argv;
diff --git a/xtract/libxtract.h b/xtract/libxtract.h
index b4808ba..af69758 100644
--- a/xtract/libxtract.h
+++ b/xtract/libxtract.h
@@ -27,6 +27,9 @@
*
* Hopefully this not only makes the library more efficient when computing large numbers of features, but also makes it more flexible because extraction functions can be combined arbitrarily (one can take the irregularility of the Mel Frequency Cepstral Coefficients for example).
*
+ *
+ * LibXtract can be downloaded from http://www.sf.net/projects/libxtract
+ *
*/
#ifndef XTRACT_H
diff --git a/xtract/xtract_scalar.h b/xtract/xtract_scalar.h
index a2e2d7b..0496eed 100644
--- a/xtract/xtract_scalar.h
+++ b/xtract/xtract_scalar.h
@@ -28,7 +28,7 @@ extern "C" {
#endif
/**
- * \defgroup scalar extraction functions
+ * \defgroup scalar scalar extraction functions
*
* Defines scalar extraction functions, and their parameters.
* @{
@@ -200,7 +200,7 @@ int xtract_smoothness(const float *data, const int N, const void *argv, float *r
*
* \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 N: the number of elements to be considered
- * \param *argv: a pointer to NULL
+ * \param *argv: a pointer to a float 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);
diff --git a/xtract/xtract_vector.h b/xtract/xtract_vector.h
index 3a626d6..ad97f16 100644
--- a/xtract/xtract_vector.h
+++ b/xtract/xtract_vector.h
@@ -28,9 +28,9 @@ extern "C" {
#endif
/**
- * \defgroup vector extraction functions
+ * \defgroup vector vector extraction functions
*
- * Defines vectorr extraction functions, and their parameters.
+ * Defines vector extraction functions, and their parameters.
* @{
*/