diff --git a/goborator.go b/goborator.go index 2269715..dff9133 100644 --- a/goborator.go +++ b/goborator.go @@ -119,7 +119,8 @@ func (g *Gaborator) gaborTransform(audioData []float32) { // keep the new maximum g.mostRecentCoefficentIndex = coefficientIndex // copy the oldest data to the history - g.fixedCoefficents = append(g.fixedCoefficents, g.coefficients[circularIndex]) + g.fixedCoefficents = append(g.fixedCoefficents, make([]float32, len(g.coefficients[circularIndex]))) + copy(g.fixedCoefficents[len(g.fixedCoefficents)-1], g.coefficients[circularIndex]) // fill the oldest with zeros for j := range g.coefficients[circularIndex] {