44 return x == 0.0 ? 1.0 : std::sin(x *
PI) / (x *
PI);
Provides methods to generate interpolation filters using Kaiser windows.
static InterpFilter & getInstance() noexcept
Retrieves the singleton instance of the InterpFilter class.
std::span< const RealType > getFilter(RealType delay) const
Retrieves a span of precomputed filter values for a given delay.
InterpFilter & operator=(InterpFilter &&)=delete
InterpFilter(const InterpFilter &)=delete
InterpFilter(InterpFilter &&)=delete
static constexpr RealType sinc(const RealType x) noexcept
Computes the sinc function for a given input.
std::expected< RealType, std::string > kaiserWinCompute(RealType x) const noexcept
Computes the Kaiser window function for a given input.
std::expected< RealType, std::string > interpFilter(RealType x) const noexcept
Computes the interpolation filter value for a given input.
InterpFilter & operator=(const InterpFilter &)=delete
Global configuration file for the project.
double RealType
Type for real numbers.
constexpr RealType PI
Mathematical constant π (pi).