diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/goertzel.c | 4 | ||||
-rw-r--r-- | src/goertzel.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/goertzel.c b/src/goertzel.c index 41fd897..d7ab641 100644 --- a/src/goertzel.c +++ b/src/goertzel.c @@ -20,14 +20,14 @@ -void goertzel_init(double freq, double rate, struct goertzel_state* restrict state) +void goertzel_init(struct goertzel_state* restrict state, double freq, double rate) { memset(state, 0, *state); state->k = 2 * cos(2 * M_PI * (freq / rate)); } -double goertzel(size_t n, const uint32_t* restrict samples, struct goertzel_state* restrict state) +double goertzel(struct goertzel_state* restrict state, const uint32_t* restrict samples, size_t n) { double power, samp, s; size_t i; diff --git a/src/goertzel.h b/src/goertzel.h index ad1e4b8..385df22 100644 --- a/src/goertzel.h +++ b/src/goertzel.h @@ -29,6 +29,6 @@ struct goertzel_state }; -void goertzel_init(double freq, double rate, struct goertzel_state* restrict state); -double goertzel(size_t n, const uint32_t* restrict samples, struct goertzel_state* restrict state); +void goertzel_init(struct goertzel_state* restrict state, double freq, double rate); +double goertzel(struct goertzel_state* restrict state, const uint32_t* restrict samples, size_t n); |