#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/audio/iir_filter.h"
#include <algorithm>
#include <complex>
#include "third_party/blink/renderer/platform/audio/audio_utilities.h"
#include "third_party/blink/renderer/platform/audio/vector_math.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/fdlibm/ieee754.h"
namespace blink {
const int kBufferLength = …;
static_assert …;
IIRFilter::IIRFilter(const AudioDoubleArray* feedforward,
const AudioDoubleArray* feedback)
: … { … }
IIRFilter::~IIRFilter() = default;
void IIRFilter::Reset() { … }
static std::complex<double> EvaluatePolynomial(const double* coef,
std::complex<double> z,
int order) { … }
void IIRFilter::Process(const float* source_p,
float* dest_p,
uint32_t frames_to_process) { … }
void IIRFilter::GetFrequencyResponse(int n_frequencies,
const float* frequency,
float* mag_response,
float* phase_response) { … }
double IIRFilter::TailTime(double sample_rate,
bool is_filter_stable,
unsigned render_quantum_frames) { … }
}