[GH-ISSUE #1325] Version 5 dev (2ea7436) --initial-volume 0 results in full volume #605

Closed
opened 2026-02-27 19:31:32 +03:00 by kerem · 5 comments
Owner

Originally created by @moodeaudio on GitHub (Sep 5, 2024).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1325

Describe the bug
The option --initial-volume 0 results in full (100%) volume when iPhone client connects and then starts playback.

The volume slider on the client appears to get set differently depending on whether the client was already playing locally before librespot is started followed by client connecting.

  1. Already playing locally: Slider gets set to 0 position after librespot starts and stays at 0 after connecting, output volume = full
  2. Not playing locally: Slider gets set to 0 position after librespot starts but then goes to almost 100% after connecting + play, output volume = full

In either case actual output volume is full volume (100%)

To reproduce
Steps to reproduce the behavior:

  1. Launch librespot with
sudo librespot --name "Moode9 Spotify" --bitrate 320 --format S16 --mixer softvol --initial-volume 0 --volume-ctrl log --volume-range 60 --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device "_audioout" --onevent /var/local/www/commandw/spotevent.sh -v > /var/log/moode_librespot.log 2>&1
  1. In Spotify iPhone App playback should be stopped
  2. Connect to "Moode9 Spotify"
  3. Observe App volume slider position
  4. NOTE: Be sure downstream volume control is set very low!
  5. Start playback
  6. Observe App volume slider position and actual output volume

Log
Its ginormous so maybe a link is best :-)
moode_librespot.log

Host (what you are running librespot on):

  • OS: RaspiOS Bookworm
  • Platform: Pi5

Additional context

  • Audio device: Allo Boss DAC
Originally created by @moodeaudio on GitHub (Sep 5, 2024). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1325 **Describe the bug** The option `--initial-volume 0` results in full (100%) volume when iPhone client connects and then starts playback. The volume slider on the client appears to get set differently depending on whether the client was already playing locally before librespot is started followed by client connecting. 1. Already playing locally: Slider gets set to 0 position after librespot starts and stays at 0 after connecting, output volume = full 2. Not playing locally: Slider gets set to 0 position after librespot starts but then goes to almost 100% after connecting + play, output volume = full In either case actual output volume is full volume (100%) **To reproduce** Steps to reproduce the behavior: 1. Launch `librespot` with ``` sudo librespot --name "Moode9 Spotify" --bitrate 320 --format S16 --mixer softvol --initial-volume 0 --volume-ctrl log --volume-range 60 --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device "_audioout" --onevent /var/local/www/commandw/spotevent.sh -v > /var/log/moode_librespot.log 2>&1 ``` 2. In Spotify iPhone App playback should be stopped 4. Connect to "Moode9 Spotify" 5. Observe App volume slider position 6. NOTE: Be sure downstream volume control is set very low! 7. Start playback 8. Observe App volume slider position and actual output volume **Log** Its ginormous so maybe a link is best :-) [moode_librespot.log](https://moodeaudio.org/test/moode_librespot.log) **Host (what you are running `librespot` on):** - OS: RaspiOS Bookworm - Platform: Pi5 **Additional context** - Audio device: Allo Boss DAC
kerem 2026-02-27 19:31:32 +03:00
Author
Owner

@kingosticks commented on GitHub (Sep 6, 2024):

And to be explicit, this is a regression compared to 0.4, yes?

Related to https://github.com/librespot-org/librespot/issues/41

<!-- gh-comment-id:2333459572 --> @kingosticks commented on GitHub (Sep 6, 2024): And to be explicit, this is a regression compared to 0.4, yes? Related to https://github.com/librespot-org/librespot/issues/41
Author
Owner

@roderickvd commented on GitHub (Sep 6, 2024):

Certainly possible because I rewrote the way it takes the volume from the initial handshake in 0.5.

This would be a good "first issue" for someone to jump and in contribute. The logic should not be difficult to find and fix.

<!-- gh-comment-id:2333520800 --> @roderickvd commented on GitHub (Sep 6, 2024): Certainly possible because I rewrote the way it takes the volume from the initial handshake in 0.5. This would be a good "first issue" for someone to jump and in contribute. The logic should not be difficult to find and fix.
Author
Owner

@moodeaudio commented on GitHub (Sep 6, 2024):

@kingosticks, yes it appears to be a regression compared to 0.4.

I should also mention that setting --initial-volume to a value greater than 0 seems to work fine.

<!-- gh-comment-id:2333771688 --> @moodeaudio commented on GitHub (Sep 6, 2024): @kingosticks, yes it appears to be a regression compared to 0.4. I should also mention that setting `--initial-volume` to a value greater than 0 seems to work fine.
Author
Owner

@roderickvd commented on GitHub (Sep 16, 2024):

Any takers before releasing 0.5 maybe this weekend?

<!-- gh-comment-id:2353534886 --> @roderickvd commented on GitHub (Sep 16, 2024): Any takers before releasing 0.5 maybe this weekend?
Author
Owner

@BeeJay28 commented on GitHub (Oct 16, 2024):

I'll take care of it in the spirit of hacktober if that's okay :)

<!-- gh-comment-id:2417423254 --> @BeeJay28 commented on GitHub (Oct 16, 2024): I'll take care of it in the spirit of hacktober if that's okay :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#605
No description provided.