crabidy/crabidy-server
Test User 4c0c5f1401 Audio: select the output device (fixes silent output on Raspberry Pi)
The player always opened the system default output device. On a
Raspberry Pi that default is often HDMI, so playback ran but nothing
came out of the headphone jack or a USB/DAC -- "it plays but I hear no
sound".

Add an [audio] device option to crabidy-server.toml: a case-insensitive
substring of the output device name (a memorable fragment is enough).
The player engine opens the first matching device and falls back to the
system default with a warning if none matches. Absent config keeps the
system default, so existing setups are unchanged.

To discover the names, a new `crabidy-server audio-devices` subcommand
(also on `cbd`) lists the output devices and marks the one the current
config selects, using the same match the server applies at startup.

Plumbing: audio_player::output_device_names() enumerates via cpal;
Player::new(Option<String>) replaces the device-less construction
(Default = new(None)); Playback::new takes the device and serve() reads
it from settings. cpal's name() is deprecated in favor of description(),
but name() returns the ALSA-stable string users see in `aplay -l` and
match against, so it is kept behind a documented #[allow(deprecated)].

README documents the [audio] device option under the Pi/config section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 20:13:23 +02:00
..
src Audio: select the output device (fixes silent output on Raspberry Pi) 2026-07-23 20:13:23 +02:00
tests Web client: prompt for login on visit when auth is enabled 2026-07-23 17:51:55 +02:00
Cargo.lock Add cargo-server with liby service draft 2023-05-22 22:05:38 +02:00
Cargo.toml Add the fyyd podcast provider (/fyyd) 2026-07-23 17:29:13 +02:00
build.rs Implement the comprehensive CLI (stage 5) 2026-07-22 12:13:51 +02:00