From 5c6ea36a7a9e98652b58327c48f392906180702c Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Fri, 17 Jan 2025 14:52:24 +0100 Subject: [PATCH] yes --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index aa8a600..8d84b3d 100644 --- a/main.go +++ b/main.go @@ -109,8 +109,8 @@ func (g *Game) Draw(screen *ebiten.Image) { lastPeriodOffset := uint32(indices[min(len(indices)-1, config.Config.PeriodCropCount)]) samplesPerCrop := lastPeriodOffset - offset for i := uint32(0); i < min(numSamples, samplesPerCrop*config.Config.PeriodCropLoopOverCount)-1; i++ { - fAX := float32(FFTBuffer[(i+offset)%samplesPerCrop]) * config.Config.Gain * float32(scale) - fBX := float32(FFTBuffer[(i+1+offset)%samplesPerCrop]) * config.Config.Gain * float32(scale) + fAX := float32(FFTBuffer[(i+offset)%numSamples]) * config.Config.Gain * float32(scale) + fBX := float32(FFTBuffer[(i+1+offset)%numSamples]) * config.Config.Gain * float32(scale) vector.StrokeLine(screen, float32(config.Config.WindowWidth)*float32(i%samplesPerCrop)/float32(samplesPerCrop), float32(config.Config.WindowHeight/2)+fAX, float32(config.Config.WindowWidth)*float32(i%samplesPerCrop+1)/float32(samplesPerCrop), float32(config.Config.WindowHeight/2)+fBX, config.Config.LineThickness, config.ThirdColorAdj, true) } } else {