mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-03 09:08:18 -04:00
fix(tracker): the peak detector result was in wrong layout
This commit is contained in:
parent
e0392323c0
commit
5c0b86a0f0
@ -375,7 +375,7 @@ func (d *peakDetector) update(buf sointu.AudioBuffer) (ret PeakResult) {
|
|||||||
for i := range d.windows {
|
for i := range d.windows {
|
||||||
d.windows[i][chn].WriteWrapSingle(p)
|
d.windows[i][chn].WriteWrapSingle(p)
|
||||||
windowPeak := vek32.Max(d.windows[i][chn].Buffer)
|
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 {
|
if d.maxPower[chn] < p {
|
||||||
d.maxPower[chn] = p
|
d.maxPower[chn] = p
|
||||||
|
Loading…
x
Reference in New Issue
Block a user