From 304fa105904a4657ffda4af518e5cc8a0128f199 Mon Sep 17 00:00:00 2001 From: Wolfyxon Date: Thu, 19 Dec 2024 20:12:54 +0100 Subject: [PATCH] Added -Dplug:dmix option to aplay args --- src/sound.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound.rs b/src/sound.rs index 39e3f33..5f1ceee 100644 --- a/src/sound.rs +++ b/src/sound.rs @@ -145,6 +145,7 @@ pub fn tone_sequence(sequence: &[(f32, i32, i32)]) -> Ev3Result { pub fn play(wav_file: &str) -> Ev3Result { Ok(Command::new("/usr/bin/aplay") .arg("-q") + .arg("-Dplug:dmix") .arg(wav_file) .stdout(Stdio::null()) .spawn()?) @@ -159,6 +160,7 @@ pub fn speak(text: &str) -> Ev3Result { Ok(Command::new("/usr/bin/aplay") .arg("-q") + .arg("-Dplug:dmix") .stdin(espeak.stdout.ok_or(Ev3Error::InternalError { msg: "`espeak` pipe to `aplay` could not be created!".to_owned(), })?)