aboutsummaryrefslogtreecommitdiffstats
path: root/core/device.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-12-11 21:42:34 -0800
committerChris Robinson <[email protected]>2021-12-11 21:42:34 -0800
commit5e3fcb3a934844f1d70aa23a8a871a6915565ed2 (patch)
tree34957fb6f4f8da7b522f131f781844e21a4c8f33 /core/device.h
parent01dd34f305b9ad2c8e6bf0642cd976f9788fdf3a (diff)
Avoid initializing the NFC filter for every voice channel
It can be initialized once with the device's speaker distance since it won't change in between resets, then copied into the voice where it can be adjusted as needed.
Diffstat (limited to 'core/device.h')
-rw-r--r--core/device.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/device.h b/core/device.h
index 194901a2..111e26ce 100644
--- a/core/device.h
+++ b/core/device.h
@@ -15,8 +15,9 @@
#include "alspan.h"
#include "ambidefs.h"
#include "atomic.h"
-#include "core/bufferline.h"
+#include "bufferline.h"
#include "devformat.h"
+#include "filters/nfc.h"
#include "intrusive_ptr.h"
#include "mixer/hrtfdefs.h"
#include "opthelpers.h"
@@ -30,7 +31,6 @@ struct Compressor;
struct ContextBase;
struct DirectHrtfState;
struct HrtfStore;
-struct UhjEncoder;
using uint = unsigned int;
@@ -171,6 +171,11 @@ struct DeviceBase {
*/
float AvgSpeakerDist{0.0f};
+ /* The default NFC filter. Not used directly, but is pre-initialized with
+ * the control distance from AvgSpeakerDist.
+ */
+ NfcFilter mNFCtrlFilter{};
+
uint SamplesDone{0u};
std::chrono::nanoseconds ClockBase{0};
std::chrono::nanoseconds FixedLatency{0};