Widen the deck row block to 1028 so the filter tie-line is exact, and accumulate the meter's block peaks instead of sampling one in 47

This commit is contained in:
2026-08-02 08:27:05 -04:00
parent 0627398bbb
commit df10ddacc2
29 changed files with 552 additions and 250 deletions
+9 -4
View File
@@ -183,11 +183,16 @@ void ReaSamplerProcessor::setLimiterEnabled(bool on) {
setInstrumentParams(params);
}
MasterBusMeter ReaSamplerProcessor::masterBusMeter() const {
MasterBusMeter ReaSamplerProcessor::masterBusMeter() {
MasterBusMeter m;
m.peakL = meterPeakL_.load(std::memory_order_relaxed);
m.peakR = meterPeakR_.load(std::memory_order_relaxed);
m.minGain = meterMinGain_.load(std::memory_order_relaxed);
// Exchange, not load: the accumulators hold the window since this was last called, and
// clearing them here is what starts the next window. The audio thread's own fold is a
// load-max-store, so a store landing between this exchange and that store can retain one
// window's peak for one extra frame — it can never LOSE one, which is the property that
// matters for a peak meter.
m.peakL = meterPeakL_.exchange(0.f, std::memory_order_relaxed);
m.peakR = meterPeakR_.exchange(0.f, std::memory_order_relaxed);
m.minGain = meterMinGain_.exchange(1.f, std::memory_order_relaxed);
m.clip = meterClip_.load(std::memory_order_relaxed);
return m;
}