sine and saw volumes

This commit is contained in:
legop3
2026-01-31 15:45:36 -05:00
parent 5916520b1a
commit 92c9ae4834
6 changed files with 17 additions and 0 deletions
+5
View File
@@ -162,6 +162,11 @@ func (h *HornSynth) synthLoop(writer *bufio.Writer, waveform string, freqs []flo
framesPerChunk := 512
buf := make([]byte, framesPerChunk*channels*2)
scale := volume / float64(len(freqs))
if waveform == "sine" {
scale *= h.cfg.SineGain
} else {
scale *= h.cfg.SawGain
}
stopRequested := false
releaseStart := -1