From 140228a936cd3704dbcc4f17a555cbe98b0d2459 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 16 Apr 2024 22:31:40 -0400 Subject: [PATCH] Mildly reduce heft of scale read. --- Outputs/Speaker/Implementation/LowpassSpeaker.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Outputs/Speaker/Implementation/LowpassSpeaker.hpp b/Outputs/Speaker/Implementation/LowpassSpeaker.hpp index 4b3d5d16e..c38df212a 100644 --- a/Outputs/Speaker/Implementation/LowpassSpeaker.hpp +++ b/Outputs/Speaker/Implementation/LowpassSpeaker.hpp @@ -300,8 +300,8 @@ template class PushLowpass: public LowpassBase scale_ = 65536; - int get_scale() { - return scale_; + int get_scale() const { + return scale_.load(std::memory_order::memory_order_relaxed); } const int16_t *buffer_ = nullptr;