NeuralAmpModelerPlugin

Plugin for Neural Amp Modeler
Log | Files | Refs | Submodules | README | LICENSE

commit 646612380b37e8ff4f2de8e3e2e5b72bbbfaa77b
parent 70f4296e7ed0382d728bcaf0b0d6114ede7db1fa
Author: Steven Atkinson <[email protected]>
Date:   Tue, 29 Oct 2024 22:39:51 -0700

Don't `SetLatency()` when it won't change the latency. (#516)

* Only _UpdateLatency() during OnReset() when sample rate changes

* SetLatency() only when setting with a different value
Diffstat:
MNeuralAmpModeler/NeuralAmpModeler.cpp | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/NeuralAmpModeler/NeuralAmpModeler.cpp b/NeuralAmpModeler/NeuralAmpModeler.cpp @@ -890,7 +890,12 @@ void NeuralAmpModeler::_UpdateLatency() latency += mModel->GetLatency(); } // Other things that add latency here... - SetLatency(latency); + + // Feels weird to have to do this. + if (GetLatency() != latency) + { + SetLatency(latency); + } } void NeuralAmpModeler::_UpdateMeters(sample** inputPointer, sample** outputPointer, const size_t nFrames,