Skip to content

spirc: Configurable volume control steps #1498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 1, 2025

Conversation

ssmccoy
Copy link
Contributor

@ssmccoy ssmccoy commented Apr 29, 2025

Allow the volume control steps to be configured via the --volume-steps command line parameter. The author personally found the default volume steps of 1024 to be completely unusable, and is presently using 128 as his configuration. Updated the default to 64 which more closely mirrors the official client behavior.

Additionally, reduce the delay in volume update from a wopping two seconds to 500ms, again for usability.

Also clean up the seemingly unnecessary use of a pattern match on whether or not --initial-volume was supplied.

Allow the volume control steps to be configured via the `--volume-steps`
command line parameter. The author personally found the default volume
steps of `1024` to be completely unusable, and is presently using `128`
as his configuration. Perhaps consider this as a more reasonable
default.

Additionally, reduce the delay in volume update from a wopping two
seconds to 500ms, again for usability.

Also clean up the seemingly unnecessary use of a pattern match on
whether or not `--initial-volume` was supplied.
@photovoltex photovoltex requested a review from Copilot April 29, 2025 17:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a configurable volume control step parameter while also reducing the volume update delay for improved usability, and it refines the handling of the initial volume option.

  • Adds the new --volume-steps option and its associated description and parsing logic.
  • Reduces the volume update delay in the spirc module from 2 seconds to 500ms.
  • Simplifies the branching for initial volume handling by eliminating an unnecessary pattern match.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/main.rs Introduces --volume-steps option and streamlines initial volume handling.
connect/src/spirc.rs Reduces volume update delay from 2s to 500ms.

Copy link
Member

@photovoltex photovoltex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission :)

Some points as context why they are like they are and potential change suggestions.

Copy link
Member

@photovoltex photovoltex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for your patience on the topic.

And in addition to the comment, please add a changelog entry for your changes :)

@ssmccoy
Copy link
Contributor Author

ssmccoy commented May 1, 2025

If you merge this, make sure it is a squash merge you don't want those fixup commits lingering.

Otherwise I can squash them together into a single commit and merge that.

@photovoltex
Copy link
Member

I will just link to what was said in this #1495 (comment). But yeah no worries, will do :)

Copy link
Member

@photovoltex photovoltex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will wait a bit if someone wants to add something to the topic

@photovoltex photovoltex merged commit 6bdc0eb into librespot-org:dev May 1, 2025
13 checks passed
@photovoltex
Copy link
Member

@ssmccoy Just as info, nothing to worry about :)

Something doesn't seem to line up in your git config. If you look at the squashed commit 6bdc0eb there are seemingly two people who worked at the change, but I would assume it was all you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants