examples/pcm: Add intervals between notes

This commit is contained in:
Hajime Hoshi 2018-12-17 23:25:52 +09:00
parent b9eba54115
commit 9142a077cf

View File

@ -119,7 +119,7 @@ func playNote(scoreIndex int) rune {
}
const vol = 1.0 / 16.0
size := 30 * sampleRate / ebiten.MaxTPS()
size := (ebiten.MaxTPS()/2 - 2) * sampleRate / ebiten.MaxTPS()
l := make([]int16, size)
r := make([]int16, size)
square(l, vol, freq, 0.25)