spotifyd
spotifyd copied to clipboard
Added alternative to disable changing volume
I added an alternative to "softvol" and "alsa"; "none". If remotely changing volume, or resetting it on restart is undesired, this is a fix.
Is this a good solution or should I investigate if we can disable remote changing of volume? Maybe change the mixer in librespot to an Option<Mixer>? This just ignores input. Perhaps the best way to move forward is to implement this and later change the librespot API?
What do you @JojiiOfficial @robinvd @SirWindfield think about this?
Does anybody know why the lint check is not successful?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still waiting for response.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still waiting for response.
Looks like all the checks are passing now.
I’m a bit confused now.
I recently saw in spotify-tui the mobile clients have volume disabled. They advertised it to the Spotify API, and spotify-tui recognises it.
Should we merge this and then use the same struct for disabling it properly (if it’s possible)? If that’s the case, I think librespot needs to support the feature.
I recently saw in
spotify-tuithe mobile clients have volume disabled. They advertised it to the Spotify API, andspotify-tuirecognises it.Should we merge this and then use the same struct for disabling it properly (if it’s possible)? If that’s the case, I think librespot needs to support the feature.
@Icelk While looking over the code today, I found by chance the following lines:
https://github.com/Spotifyd/spotifyd/blob/fbcbeca6562f02f53ab5e9771f7d8c2a3c9ae3cf/src/setup.rs#L69-L80
I was wondering, why this struct exists, since the actual volume control is done by the mixer, which has nothing to do with this setting. Apparently, this exists to signal to Spotify clients the type of volume control this device implements. And, most importantly, it has three possible states: Log, Linear and Fixed. I think the latter could be quite interesting to us.
If you're still interested after all this time, this PR has been lying around, I suspect that it might be possible to turn off the client volume control via this setting! If not, that's completely understandable and okay too, of course!
Thanks for the consideration! You were completely correct.
I rewrote this PR to be up to date with the latest master, and implemented your idea. Thanks for the tip!
This PR now doesn't seem to have any issues. Can I improve anything @eladyn ?
Wow! I wouldn't have expected such a fast response after such a long time. Thank you for the effort.
No problem :)
Just some comments on the code that might remove some duplicate code. The rest looks fine!
Just pushed some fixes.
Thanks for your swift responses!
Thanks!