11 #ifndef SAL_BINAURALMIC_H
12 #define SAL_BINAURALMIC_H
20 #include "firfilter.h"
29 class BinauralMicInstance;
39 const Int update_length,
47 virtual void Reset() noexcept;
57 const Int num_samples,
58 const mcl::Point& point,
60 Buffer& output_buffer) noexcept;
68 virtual Signal GetBrir(
const Ear ear,
const mcl::Point& point) noexcept = 0;
70 void CreateInstanceIfNotExist(
const Int wave_id) noexcept;
72 std::map<UInt, BinauralMicInstance> instances_;
93 const Int update_length,
100 void FilterAll(mcl::DigitalFilter* filter);
116 previous_point_(mcl::Point(NAN, NAN, NAN)),
118 filter_left_(mcl::FirFilter::GainFilter(1.0)),
119 filter_right_(mcl::FirFilter::GainFilter(1.0)),
120 update_length_(update_length),
121 reference_orientation_(reference_orientation) {}
123 void AddPlaneWaveRelative(
const Sample* input_data,
124 const Int num_samples,
125 const mcl::Point& point,
126 Buffer& output_buffer) noexcept;
128 void UpdateFilter(
const mcl::Point& point) noexcept;
136 mcl::Point previous_point_;
139 mcl::FirFilter filter_left_;
140 mcl::FirFilter filter_right_;