feat: volume sliders, output device switching, About credits (1.1.0)
CI / macos-latest (push) Canceled after 0s
CI / ubuntu-latest (push) Canceled after 0s
CI / windows-latest (push) Canceled after 0s

- Per-app volume slider and a system volume card (slider + mute)
- Default output device picker; per-app output device picker
  (Windows via IPolicyConfig / IAudioPolicyConfigFactory, Linux via
  sink moves; macOS has no per-app routing API)
- Slider commands are coalesced on the audio thread
- Fix the Windows title-bar and taskbar icon (set via winit attributes)
- About: "by X4Lo" and a GitHub link
- README: app icon above the title
- --list prints output devices and system volume
- CI: run on master and on manual dispatch
This commit is contained in:
X4Lo committed 2026-11-15 21:25:10 +00:00
1 parent 8f476dbe52
commit c5cb407481
20 files changed
+1440 -138

No files matched your search

+8 -1
View File
@@ -45,12 +45,19 @@ HushKey is a single Rust binary with four layers. Only `src/audio/{windows,macos
```rust
pub trait AudioController {
fn backend_name(&self) -> &'static str;
fn capabilities(&self) -> Capabilities; // per_app_volume / per_app_mute
fn capabilities(&self) -> Capabilities; // per-app volume/mute/device, master volume, devices
fn list_audio_apps(&mut self) -> AudioResult<Vec<AudioApp>>;
fn set_app_volume(&mut self, app: &str, volume: f32) -> AudioResult<()>;
fn set_app_mute(&mut self, app: &str, muted: bool) -> AudioResult<()>;
fn mute_all(&mut self) -> AudioResult<MuteSnapshot>; // default impl
fn restore_all(&mut self, snapshot: &MuteSnapshot) -> AudioResult<()>; // default impl
// Optional; the defaults return Unsupported / nothing:
fn output_devices(&mut self) -> AudioResult<Vec<OutputDevice>>;
fn set_default_output_device(&mut self, id: &str) -> AudioResult<()>;
fn master_volume(&mut self) -> AudioResult<MasterVolume>;
fn set_master_volume(&mut self, volume: f32) -> AudioResult<()>;
fn set_master_mute(&mut self, muted: bool) -> AudioResult<()>;
fn set_app_output_device(&mut self, app: &str, device: Option<&str>) -> AudioResult<()>;
fn app_icon(&mut self, app: &AudioApp) -> Option<IconData> { None }
fn platform_note(&self) -> Option<&'static str> { None }
}