diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-21 05:27:53 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-21 05:27:53 +0100 |
commit | 9d721b584dfed6f5f31461b6bcefe81e41f8295f (patch) | |
tree | 122efd055e4720329f7903d4699a53c2e749533f | |
parent | Goertzel algorithm (diff) | |
download | fodtmf-9d721b584dfed6f5f31461b6bcefe81e41f8295f.tar.gz fodtmf-9d721b584dfed6f5f31461b6bcefe81e41f8295f.tar.bz2 fodtmf-9d721b584dfed6f5f31461b6bcefe81e41f8295f.tar.xz |
reorder parameters
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-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); |