working on todo.md features
This commit is contained in:
1 parent
210d124814
commit
8f54841c2c
110 files changed
+15932
-6576
No files matched your search
@@ -61,6 +61,13 @@ void biquad(MathOp op, double fc, double q, double dt, double& b0, double& b1, d
|
||||
/// that actually need carrying between samples.
|
||||
double biquad_step(double x, double b0, double b1, double b2, double a1, double a2, double& z1,
|
||||
double& z2) {
|
||||
// A reserved hole is NaN in the source, and a NaN integrated into the state words is
|
||||
// permanent: every later sample would come out NaN, so a filtered trace died at the first
|
||||
// gap and never came back -- which is what a dropped packet did to every low pass in
|
||||
// relative mode, where a counter gap reserves NaN slots by construction. A gap in the input
|
||||
// is a gap in the output (the hole stays visible), and the filter's history is the last
|
||||
// *real* samples it saw, so the state is left alone and the trace resumes after the hole.
|
||||
if (!std::isfinite(x)) return kNaN;
|
||||
const double y = b0 * x + z1;
|
||||
z1 = b1 * x - a1 * y + z2;
|
||||
z2 = b2 * x - a2 * y;
|
||||
|
||||
Reference in new issue
Block a user