diff options
Diffstat (limited to 'templates/1_convolve_simple.cpp')
-rw-r--r-- | templates/1_convolve_simple.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/1_convolve_simple.cpp b/templates/1_convolve_simple.cpp index 0f1973d..8de05d3 100644 --- a/templates/1_convolve_simple.cpp +++ b/templates/1_convolve_simple.cpp @@ -7,10 +7,10 @@ * transient response is not calculated. */ -adcsample_t *process_data(adcsample_t *samples, unsigned int size) +Sample *process_data(Samples samples) { // Define our output buffer. SIZE is the largest size of the 'samples' buffer. - static adcsample_t buffer[SIZE]; + static Sample buffer[samples.size()]; // Define our filter constexpr unsigned int filter_size = 3; @@ -19,7 +19,7 @@ adcsample_t *process_data(adcsample_t *samples, unsigned int size) }; // Begin convolving: - for (int n = 0; n < size - (filter_size - 1); n++) { + for (int n = 0; n < samples.size() - (filter_size - 1); n++) { buffer[n] = 0; for (int k = 0; k < filter_size; k++) buffer[n] += samples[n + k] * filter[k]; |