spirc: Configurable volume control steps#1498
Conversation
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.
There was a problem hiding this comment.
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. |
photovoltex
left a comment
There was a problem hiding this comment.
Thanks for the submission :)
Some points as context why they are like they are and potential change suggestions.
photovoltex
left a comment
There was a problem hiding this comment.
Looks good, thanks for your patience on the topic.
And in addition to the comment, please add a changelog entry for your changes :)
|
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. |
|
I will just link to what was said in this #1495 (comment). But yeah no worries, will do :) |
photovoltex
left a comment
There was a problem hiding this comment.
LGTM, will wait a bit if someone wants to add something to the topic
* spirc: Configurable volume control steps 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. * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps --------- Co-authored-by: Scott S. McCoy <scott.s.mccoy@acm.org>
* spirc: Configurable volume control steps 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. * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps * fixup! spirc: Configurable volume control steps --------- Co-authored-by: Scott S. McCoy <scott.s.mccoy@acm.org>
Allow the volume control steps to be configured via the
--volume-stepscommand line parameter. The author personally found the default volume steps of1024to be completely unusable, and is presently using128as his configuration. Updated the default to64which 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-volumewas supplied.