mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 10:00:46 -04:00
guh
This commit is contained in:
+4
-3
@@ -124,10 +124,11 @@ func (h *HornSynth) run(waveform string, freqs []float64, stop <-chan struct{})
|
||||
h.mu.Unlock()
|
||||
volume *= gain
|
||||
|
||||
args := []string{"-q", "-f", "S16_LE", "-c", fmt.Sprintf("%d", channels), "-r", fmt.Sprintf("%d", rate), "-t", "raw"}
|
||||
if h.cfg.Device != "" {
|
||||
args = append(args, "-D", h.cfg.Device)
|
||||
device := strings.TrimSpace(h.cfg.Device)
|
||||
if device == "" {
|
||||
device = "horn"
|
||||
}
|
||||
args := []string{"-q", "-D", device, "-f", "S16_LE", "-c", fmt.Sprintf("%d", channels), "-r", fmt.Sprintf("%d", rate), "-t", "raw"}
|
||||
cmd := exec.Command("aplay", args...)
|
||||
stdin, err := cmd.StdinPipe()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user