11 float coeffs
[2*2 + 1];
16 float coeffs
[3*2 + 1];
20 typedef struct NfcFilter
{
21 struct NfcFilter1 first
;
22 struct NfcFilter2 second
;
23 struct NfcFilter3 third
;
28 * w0 = speed_of_sound / (source_distance * sample_rate);
29 * w1 = speed_of_sound / (control_distance * sample_rate);
31 * Generally speaking, the control distance should be approximately the average
32 * speaker distance, or based on the reference delay if outputing NFC-HOA. It
33 * must not be negative, 0, or infinite. The source distance should not be too
34 * small relative to the control distance.
37 void NfcFilterCreate(NfcFilter
*nfc
, const float w0
, const float w1
);
38 void NfcFilterAdjust(NfcFilter
*nfc
, const float w0
);
40 /* Near-field control filter for first-order ambisonic channels (1-3). */
41 void NfcFilterProcess1(NfcFilter
*nfc
, float *restrict dst
, const float *restrict src
, const int count
);
43 /* Near-field control filter for second-order ambisonic channels (4-8). */
44 void NfcFilterProcess2(NfcFilter
*nfc
, float *restrict dst
, const float *restrict src
, const int count
);
46 /* Near-field control filter for third-order ambisonic channels (9-15). */
47 void NfcFilterProcess3(NfcFilter
*nfc
, float *restrict dst
, const float *restrict src
, const int count
);
49 #endif /* FILTER_NFC_H */