From c753b8fc7fe3f9073324244fdd439c51863b39a3 Mon Sep 17 00:00:00 2001 From: Extremesecrecy <10959169+extremesecrecy@users.noreply.github.com> Date: Sat, 26 Jul 2025 14:20:14 -0700 Subject: [PATCH] Update JackServerSettings.hpp Declared Equals as a const method in JackServerSettings so it can be called on const instances without compiler errors SetJackServerSettings now checks for changes before restarting audio, preventing redundant restarts --- src/JackServerSettings.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/JackServerSettings.hpp b/src/JackServerSettings.hpp index a1d972a..488af66 100644 --- a/src/JackServerSettings.hpp +++ b/src/JackServerSettings.hpp @@ -106,9 +106,13 @@ namespace pipedal isOnboarding_ = value; } - bool Equals(const JackServerSettings &other) + bool Equals(const JackServerSettings &other) const { - return this->alsaInputDevice_ == other.alsaInputDevice_ && this->alsaOutputDevice_ == other.alsaOutputDevice_ && this->sampleRate_ == other.sampleRate_ && this->bufferSize_ == other.bufferSize_ && this->numberOfBuffers_ == other.numberOfBuffers_; + return this->alsaInputDevice_ == other.alsaInputDevice_ && + this->alsaOutputDevice_ == other.alsaOutputDevice_ && + this->sampleRate_ == other.sampleRate_ && + this->bufferSize_ == other.bufferSize_ && + this->numberOfBuffers_ == other.numberOfBuffers_; } DECLARE_JSON_MAP(JackServerSettings);