fix(tracker): the peak detector result was in wrong layout

This commit is contained in:
5684185+vsariola@users.noreply.github.com 2025-04-27 14:09:55 +03:00
parent e0392323c0
commit 5c0b86a0f0

View File

@ -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