mirror of
https://github.com/make-42/xyosc
synced 2025-01-18 10:47:10 +01:00
yes
This commit is contained in:
parent
005b3ae47b
commit
bc5597c436
6
main.go
6
main.go
@ -110,13 +110,13 @@ func (g *Game) Draw(screen *ebiten.Image) {
|
||||
signal := detector.Next(newPoint)
|
||||
switch signal {
|
||||
case peakdetect.SignalPositive:
|
||||
offset = uint32(i)
|
||||
offset = uint32(i + lag)
|
||||
break
|
||||
}
|
||||
}
|
||||
for i := uint32(0); i < numSamples-1; i++ {
|
||||
fAX := float32(FFTBuffer[(i-offset)%numSamples]) * config.Config.Gain * float32(scale)
|
||||
fBX := float32(FFTBuffer[(i+1-offset)%numSamples]) * 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)/float32(numSamples), float32(config.Config.WindowHeight/2)+fAX, float32(config.Config.WindowWidth)*float32(i+1)/float32(numSamples), float32(config.Config.WindowHeight/2)+fBX, config.Config.LineThickness, config.ThirdColorAdj, true)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user