From 68e96545020af2f8586d5ed6881d42c48357be35 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 14 Dec 2022 23:58:44 +0000 Subject: [PATCH] add i to init, a little clearer to read --- bus.go | 2 +- strip.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bus.go b/bus.go index 1b168f1..89d5b21 100644 --- a/bus.go +++ b/bus.go @@ -277,7 +277,7 @@ func newBusLevels(i int, k *kind) *levels { func (l *levels) All() []float64 { levels := make([]float64, l.offset) for i := range levels { - levels[i] = convertLevel(_levelCache.busLevels[i+l.init]) + levels[i] = convertLevel(_levelCache.busLevels[l.init+i]) } return levels } diff --git a/strip.go b/strip.go index 5a2214c..f2f25e9 100644 --- a/strip.go +++ b/strip.go @@ -600,7 +600,7 @@ func (l *levels) PreFader() []float64 { _levelCache.stripMode = 0 levels := make([]float64, l.offset) for i := range levels { - levels[i] = convertLevel(_levelCache.stripLevels[i+l.init]) + levels[i] = convertLevel(_levelCache.stripLevels[l.init+i]) } return levels } @@ -610,7 +610,7 @@ func (l *levels) PostFader() []float64 { _levelCache.stripMode = 1 levels := make([]float64, l.offset) for i := range levels { - levels[i] = convertLevel(_levelCache.stripLevels[i+l.init]) + levels[i] = convertLevel(_levelCache.stripLevels[l.init+i]) } return levels } @@ -620,7 +620,7 @@ func (l *levels) PostMute() []float64 { _levelCache.stripMode = 2 levels := make([]float64, l.offset) for i := range levels { - levels[i] = convertLevel(_levelCache.stripLevels[i+l.init]) + levels[i] = convertLevel(_levelCache.stripLevels[l.init+i]) } return levels }