1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-04 10:19:27 +02:00

Implement mapped volume for alsa mixer

This commit is contained in:
ashthespy 2018-09-17 17:28:54 +02:00 committed by Sasha Hilton
parent 4886d4eed2
commit 3dfad7f788
3 changed files with 102 additions and 19 deletions

View file

@ -150,6 +150,11 @@ fn setup(args: &[String]) -> Setup {
"Alsa mixer index, Index of the cards mixer. Defaults to 0",
"MIXER_INDEX",
)
.optflag(
"",
"mixer-linear-volume",
"Disable alsa's mapped volume scale (cubic). Default false",
)
.optopt(
"",
"initial-volume",
@ -241,6 +246,7 @@ fn setup(args: &[String]) -> Setup {
.opt_str("mixer-index")
.map(|index| index.parse::<u32>().unwrap())
.unwrap_or(0),
mapped_volume: !matches.opt_present("mixer-linear-volume"),
};
let use_audio_cache = !matches.opt_present("disable-audio-cache");