Skip to content

Commit 961972f

Browse files
committed
Add ResizingOversampler::reset()
1 parent 569fe6e commit 961972f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

util/filter.hh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ struct ResizingOversampler {
122122
return val_;
123123
}
124124

125+
void reset() {
126+
buff_ = 0;
127+
val_ = 0;
128+
idx_ = 0;
129+
}
130+
125131
ResizingOversampler &operator=(ResizingOversampler const &that) {
126132
buff_ = that.buff_;
127133
val_ = that.val_;
@@ -133,7 +139,7 @@ struct ResizingOversampler {
133139
private:
134140
float buff_ = 0;
135141
float val_ = 0;
136-
unsigned int idx_ = 0;
142+
unsigned idx_ = 0;
137143
unsigned size_ = 1;
138144
};
139145

0 commit comments

Comments
 (0)