Skip to content

Commit

Permalink
Add ResizingOversampler::reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
danngreen committed Oct 22, 2024
1 parent 569fe6e commit 961972f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion util/filter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ struct ResizingOversampler {
return val_;
}

void reset() {
buff_ = 0;
val_ = 0;
idx_ = 0;
}

ResizingOversampler &operator=(ResizingOversampler const &that) {
buff_ = that.buff_;
val_ = that.val_;
Expand All @@ -133,7 +139,7 @@ struct ResizingOversampler {
private:
float buff_ = 0;
float val_ = 0;
unsigned int idx_ = 0;
unsigned idx_ = 0;
unsigned size_ = 1;
};

Expand Down

0 comments on commit 961972f

Please sign in to comment.