From 5c0b86a0f0afc2d3b46ccb0ce55a204df8c84665 Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Sun, 27 Apr 2025 14:09:55 +0300 Subject: [PATCH] fix(tracker): the peak detector result was in wrong layout --- tracker/detector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracker/detector.go b/tracker/detector.go index e8cb925..4e1c556 100644 --- a/tracker/detector.go +++ b/tracker/detector.go @@ -375,7 +375,7 @@ func (d *peakDetector) update(buf sointu.AudioBuffer) (ret PeakResult) { for i := range d.windows { d.windows[i][chn].WriteWrapSingle(p) windowPeak := vek32.Max(d.windows[i][chn].Buffer) - ret[chn][i+int(PeakMomentary)] = Decibel(10 * math.Log10(float64(windowPeak))) + ret[i+int(PeakMomentary)][chn] = Decibel(10 * math.Log10(float64(windowPeak))) } if d.maxPower[chn] < p { d.maxPower[chn] = p