aboutsummaryrefslogtreecommitdiff
path: root/src/sound.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-03-28 00:32:35 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-03-28 00:32:35 +0300
commitf8c4d6a5f1bd4bcaee43ba3e1373465cd960cdc3 (patch)
tree10e9d52f05b476f83a3ee88a87a7c8f7aca9eca6 /src/sound.rs
parent787786c62009f6c27a0091b61017ae5ad5c95c0e (diff)
feat: add per-agent sound overrides
Diffstat (limited to 'src/sound.rs')
-rw-r--r--src/sound.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sound.rs b/src/sound.rs
index f4123e10..e184d02c 100644
--- a/src/sound.rs
+++ b/src/sound.rs
@@ -40,9 +40,10 @@ fn play_bytes(data: &[u8]) -> Result<(), String> {
Command::new("afplay").arg(&tmp).output()
} else {
// Try paplay (PulseAudio) first, fall back to aplay (ALSA)
- Command::new("paplay").arg(&tmp).output().or_else(|_| {
- Command::new("aplay").arg(&tmp).output()
- })
+ Command::new("paplay")
+ .arg(&tmp)
+ .output()
+ .or_else(|_| Command::new("aplay").arg(&tmp).output())
};
let _ = std::fs::remove_file(&tmp);