mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix initial volume showing zero but playing full volume (#1373)
This commit is contained in:
parent
1912065248
commit
d8e84238ab
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue