Fix initial volume showing zero but playing full volume (#1373)

This commit is contained in:
Artur H. 2024-10-17 17:02:56 +02:00 committed by GitHub
parent 1912065248
commit d8e84238ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed ### Removed
### Fixed
- [connect] Fixes initial volume showing zero despite playing in full volume instead
## [0.5.0] - 2024-10-15 ## [0.5.0] - 2024-10-15
This version is be a major departure from the architecture up until now. It This version is be a major departure from the architecture up until now. It

View file

@ -1509,7 +1509,7 @@ impl SpircTask {
fn set_volume(&mut self, volume: u16) { fn set_volume(&mut self, volume: u16) {
let old_volume = self.device.volume(); let old_volume = self.device.volume();
let new_volume = volume as u32; let new_volume = volume as u32;
if old_volume != new_volume { if old_volume != new_volume || self.mixer.volume() != volume {
self.device.set_volume(new_volume); self.device.set_volume(new_volume);
self.mixer.set_volume(volume); self.mixer.set_volume(volume);
if let Some(cache) = self.session.cache() { if let Some(cache) = self.session.cache() {