aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/goertzel.h
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-01-27 16:57:34 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:01:08 +0100
commit7ea3bc188df54a4dbe3026bc30ed39a5cded8fdb (patch)
tree696c78eca5f1676246fed55314c1eab67408c7f4 /src/common/goertzel.h
parent538a9591285bdc2604c5e05c06e4b2d776f4bdf9 (diff)
Move samples of int16_t format to sample_t, that is of type double
This prepares the correction of all levels
Diffstat (limited to 'src/common/goertzel.h')
-rw-r--r--src/common/goertzel.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/goertzel.h b/src/common/goertzel.h
index 7feba16..58fcbb8 100644
--- a/src/common/goertzel.h
+++ b/src/common/goertzel.h
@@ -1,5 +1,10 @@
-double audio_level(int16_t *samples, int length);
+double audio_level(sample_t *samples, int length);
-void audio_goertzel(int16_t *samples, int length, int offset, int *coeff, double *result, int k);
+typedef struct goertzel {
+ double coeff;
+} goertzel_t;
+
+void audio_goertzel_init(goertzel_t *goertzel, double freq, int samplerate);
+void audio_goertzel(goertzel_t *goertzel, sample_t *samples, int length, int offset, double *result, int k);