Add IIR execute_in_place()

This commit is contained in:
Jared Boone 2015-07-20 09:33:56 -07:00
parent 71990b380a
commit 876a591a66
2 changed files with 11 additions and 6 deletions

View file

@ -39,12 +39,17 @@ public:
{
}
void execute(buffer_s16_t buffer) {
for(size_t i=0; i<buffer.count; i++) {
buffer.p[i] = execute_sample(buffer.p[i]);
void execute(buffer_s16_t buffer_in, buffer_s16_t buffer_out) {
// TODO: Assert that buffer_out.count == buffer_in.count.
for(size_t i=0; i<buffer_out.count; i++) {
buffer_out.p[i] = execute_sample(buffer_in.p[i]);
}
}
void execute_in_place(buffer_s16_t buffer) {
execute(buffer, buffer);
}
private:
const std::array<float, 3> b;
const std::array<float, 3> a;