mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
sine and saw volumes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user