feat(lib, daemon, cli, gui): add volume multiplier (#175)

* initial implementation

* rename DaemonConfig.volume_multiplier to default_volume_multiplier

* add volume_multiplier to the FullState

* add pwsp-gui integration
This commit is contained in:
Tarasov Aleksandr
2026-07-24 05:33:51 +03:00
committed by GitHub
parent a33d023950
commit 65ae8589db
11 changed files with 171 additions and 10 deletions
+6
View File
@@ -88,6 +88,8 @@ enum GetCommands {
#[clap(short, long)]
id: Option<u32>,
},
/// Volume multiplier for all tracks
VolumeMultiplier,
/// Playback position (in seconds)
Position {
#[clap(short, long)]
@@ -124,6 +126,8 @@ enum SetCommands {
#[clap(short, long)]
id: Option<u32>,
},
/// Volume multiplier for all tracks
VolumeMultiplier { volume: f32 },
/// Playback position (in seconds)
Position {
position: f32,
@@ -177,6 +181,7 @@ async fn main() -> Result<()> {
Commands::Get { parameter } => match parameter {
GetCommands::IsPaused => Request::get_is_paused(),
GetCommands::Volume { id } => Request::get_volume(id),
GetCommands::VolumeMultiplier => Request::get_volume_multiplier(),
GetCommands::Position { id } => Request::get_position(id),
GetCommands::Duration { id } => Request::get_duration(id),
GetCommands::State => Request::get_state(),
@@ -190,6 +195,7 @@ async fn main() -> Result<()> {
},
Commands::Set { parameter } => match parameter {
SetCommands::Volume { volume, id } => Request::set_volume(volume, id),
SetCommands::VolumeMultiplier { volume } => Request::set_volume_multiplier(volume),
SetCommands::Position { position, id } => Request::seek(position, id),
SetCommands::Input { name } => Request::set_input(&name),
SetCommands::Loop { enabled, id } => Request::set_loop(&enabled, id),