aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/scalar.c18
2 files changed, 11 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 89154c5..7092ff6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,3 +13,5 @@ lib_LTLIBRARIES = libxtract.la
libxtract_la_CFLAGS = $(FFT_DEFINE)
libxtract_la_SOURCES = $(SOURCES)
libxtract_la_LDFLAGS = -export-dynamic
+
+EXTRA_DIST = xtract_globals_private.h xtract_macros_private.h xtract_window_private.h
diff --git a/src/scalar.c b/src/scalar.c
index d2bc317..de1ac03 100644
--- a/src/scalar.c
+++ b/src/scalar.c
@@ -74,7 +74,7 @@ int xtract_variance(const float *data, const int N, const void *argv, float *res
int n = N;
- *result += 0.f;
+ *result = 0.f;
while(n--)
*result += powf(data[n] - *(float *)argv, 2);
@@ -95,7 +95,7 @@ int xtract_average_deviation(const float *data, const int N, const void *argv, f
int n = N;
- *result += 0.f;
+ *result = 0.f;
while(n--)
*result += fabsf(data[n] - *(float *)argv);
@@ -111,7 +111,7 @@ int xtract_skewness(const float *data, const int N, const void *argv, float *re
float temp = 0.f;
- *result += 0.f;
+ *result = 0.f;
while(n--){
temp = (data[n] - ((float *)argv)[0]) / ((float *)argv)[1];
@@ -130,7 +130,7 @@ int xtract_kurtosis(const float *data, const int N, const void *argv, float *re
float temp = 0.f;
- *result += 0.f;
+ *result = 0.f;
while(n--){
temp = (data[n] - ((float *)argv)[0]) / ((float *)argv)[1];
@@ -183,7 +183,7 @@ int xtract_spectral_variance(const float *data, const int N, const void *argv, f
amps = data;
freqs = data + m;
- *result += 0.f;
+ *result = 0.f;
while(m--){
A += amps[m];
@@ -213,7 +213,7 @@ int xtract_spectral_average_deviation(const float *data, const int N, const void
amps = data;
freqs = data + m;
- *result += 0.f;
+ *result = 0.f;
while(m--){
A += amps[m];
@@ -236,7 +236,7 @@ int xtract_spectral_skewness(const float *data, const int N, const void *argv,
amps = data;
freqs = data + m;
- *result += 0.f;
+ *result = 0.f;
while(m--){
A += amps[m];
@@ -261,7 +261,7 @@ int xtract_spectral_kurtosis(const float *data, const int N, const void *argv,
amps = data;
freqs = data + m;
- *result += 0.f;
+ *result = 0.f;
while(m--){
A += amps[m];
@@ -763,7 +763,7 @@ int xtract_nonzero_count(const float *data, const int N, const void *argv, float
int n = N;
- *result += 0.f;
+ *result = 0.f;
while(n--)
*result += (*data++ ? 1 : 0);