13 float base_gain
, gain
;
18 float base_gain
, gain
;
19 float b1
, b2
, b3
, a1
, a2
, a3
;
23 float base_gain
, gain
;
24 float b1
, b2
, b3
, b4
, a1
, a2
, a3
, a4
;
36 * w0 = speed_of_sound / (source_distance * sample_rate);
37 * w1 = speed_of_sound / (control_distance * sample_rate);
39 * Generally speaking, the control distance should be approximately the
40 * average speaker distance, or based on the reference delay if outputing
41 * NFC-HOA. It must not be negative, 0, or infinite. The source distance
42 * should not be too small relative to the control distance.
45 void init(const float w1
) noexcept
;
46 void adjust(const float w0
) noexcept
;
48 /* Near-field control filter for first-order ambisonic channels (1-3). */
49 void process1(float *RESTRICT dst
, const float *RESTRICT src
, const size_t count
);
51 /* Near-field control filter for second-order ambisonic channels (4-8). */
52 void process2(float *RESTRICT dst
, const float *RESTRICT src
, const size_t count
);
54 /* Near-field control filter for third-order ambisonic channels (9-15). */
55 void process3(float *RESTRICT dst
, const float *RESTRICT src
, const size_t count
);
57 /* Near-field control filter for fourth-order ambisonic channels (16-24). */
58 void process4(float *RESTRICT dst
, const float *RESTRICT src
, const size_t count
);
61 #endif /* FILTER_NFC_H */