mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #472] softmixer: Volume changes lead to clicks #298
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#298
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @v1ne on GitHub (May 2, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/472
Scenario:
– Start Spotify client on Linux/Windows
– Select your
librespotinstance as playback device– Start playback
– Click the volume slider in the client at different places
Expected:
– Volume changes
Actual:
– An audible click is produced sometimes and the volume changes
The patch below solves the issue, but contains unsafe code because
AudioFilterhas no access to mutable state and I'm not a Rust programmer. 0:-) Because of that, I didn't feel comfortable to make a pull request out of it.@v1ne commented on GitHub (May 2, 2020):
@ashthespy: Maybe that's also something for Vollibrespot.
@ashthespy commented on GitHub (May 9, 2020):
@v1ne Thanks, will have a look :-)
@roderickvd commented on GitHub (Mar 12, 2021):
I cannot reproduce this on my setup. One is a RPi 3B+ with Alsa backend feeding into an external DAC over I2S, the other Rodio on macOS. What does your setup look like?
@v1ne commented on GitHub (Mar 12, 2021):
I'm using a Raspberry Pi 3B Rev. 1.2 with a HiFiBerry Digi (rewired to work on RPi 3). That is connected via an optical cable to my Nubert NuPro X-4000 speakers.
At this point, I used the ALSA backend. But because of other issues (stream stopping/starting without a grace period in between songs, leading to other discontinuities, if I remember correctly), I had to switch to the PulseAudio backend.
@roderickvd commented on GitHub (May 24, 2021):
If you use
amixer sset '{name}' {x}%on the command line, back and forth between variousxvolumes, do you experience the same issue? (I think you should, there is nothing else going on inlibrespotsoftvolthan what Alsa does.You can find out the name of your mixer control with
amixer scontrols. I'm not sure if the HifiBerry Digi has hardware volume control. If not, you'll need to set up AlsaSoftvolfor this card to perform this experiment.As much as I appreciate your idea of ramping up and down, this is not normal for a volume control to do. So in expectation you'll experience the same issue with
amixer, I'm closing this for now. Feel free to re-open if the issue persists.@v1ne commented on GitHub (May 24, 2021):
Hi. I just tried this with the Spotify client on Linux, remote-controlling Spotify on Windows 10 20H2 with a ZOOM UAC-2 audio interface: No audible clicks at all.
Changing the volume in large steps in Windows: no clicks either.
Changing the volume in large steps on my Android smartphone: no clicks either.
As a DAW developer, I assure you that audible clicks are not expected if the user changes the gain. This can be fine in some internal node, but at least when you expose such a parameter to the user, you have to take precautions to avoid clicks. The same way it is unacceptable from a UX perspective to produce clicks when switching tracks, starting playback, stopping playback, seeking, …
@roderickvd commented on GitHub (May 25, 2021):
I know, and if that was due to
librespotthen yes that would be broken.Did you try my debugging steps above?
Also have you tried running
librespot --mixer alsa?I'm not saying it's not important, I'm saying:
w.r.t. point 1, if this was a wide-spread issue then rest assured there would be a lot of complaints and issue reports.
Hardware this has been tested on:
So there's strong evidence it's not due to
librespot, but if your debugging finds it is then we can look into it again.