Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
sanitize.hpp
Go to the documentation of this file.
1#pragma once
2
3// Scalar recovery shared by recursive FDN stages. This stays independent of
4// any particular filter topology so delay, diffusion, and envelope code do not
5// acquire a biquad dependency merely to stop NaN/Inf propagation.
6
7#include <cmath>
8
9namespace pulp::signal::fdn {
10
11template <typename T>
12inline T finite_or_zero(T value) {
13 return std::isfinite(static_cast<double>(value)) ? value : T{0};
14}
15
16} // namespace pulp::signal::fdn
Definition config.hpp:15
T finite_or_zero(T value)
Definition sanitize.hpp:12