feat: adds volume cards
This commit is contained in:
parent
90fd1a00ab
commit
8aecb2e518
@ -3,7 +3,7 @@
|
||||
"27271E24211E1E26": {
|
||||
"Play": "02 - Disturbed - Immortalized.mp3"
|
||||
},
|
||||
"27271E242121221F": "Shuffle",
|
||||
"27271E242121221F": "VolumeUp",
|
||||
"27271E2420222321": {
|
||||
"Play": "01-13 33 RPM.flac"
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ pub enum Card {
|
||||
Next,
|
||||
Previous,
|
||||
Shuffle,
|
||||
VolumeUp,
|
||||
VolumeDown,
|
||||
ToggleHotspot,
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,9 @@ pub fn run(rx: &Receiver<Arc<str>>, library: &Arc<Mutex<Library>>) -> Result<(),
|
||||
toggle_hotspot(!hotspot_enabled)?;
|
||||
hotspot_enabled = !hotspot_enabled;
|
||||
}
|
||||
// TODO: Volume management. Currently the volume is set independetly from the OS which leads to a horrible quality decrease.
|
||||
Card::VolumeUp => sink.set_volume(sink.volume() + 1.0),
|
||||
Card::VolumeDown => sink.set_volume(sink.volume() - 1.0),
|
||||
}
|
||||
} else {
|
||||
println!("No music file found for this card");
|
||||
|
Loading…
x
Reference in New Issue
Block a user