feat: add software volume control with perceptual curve and ramping#14
Closed
teancom wants to merge 1 commit intomusic-assistant:mainfrom
Closed
feat: add software volume control with perceptual curve and ramping#14teancom wants to merge 1 commit intomusic-assistant:mainfrom
teancom wants to merge 1 commit intomusic-assistant:mainfrom
Conversation
Add configurable volume control mode (Auto/Hardware/Software/Disabled) that resolves at connection time based on user preference and hardware availability. Software mode applies a perceptual power curve ((vol/100)^4) with 20ms linear ramping to prevent clicks. - VolumeControlMode enum with Auto default, persisted in settings JSON - ResolvedVolumeMode (Hardware/Software/None) resolved once per session - SoftwareGainState: gain curve, ramp smoothing, i24 PCM sample processing - Volume/mute commands routed by resolved mode - Software mode skips state echo to server (prevents feedback-loop desync) - Drain pending volume commands before each buffer enqueue (reduces latency) - Settings UI dropdown with immediate reconnect on change - 21 automated tests, human test plan Known limitation: gain applied at enqueue time, not playback time. SyncedPlayer buffers ~2s ahead, so software volume changes have latency until sendspin-rs adds a post-processing callback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Converting to draft while I investigate what it would take to add the actual software gain / mute functionality to sendspin-rs. |
Contributor
Author
|
I created a sendspin-rs PR here: Sendspin/sendspin-rs#10 and a newly updated version of this feature here: #15 Leaving this PR open until the sendspin-rs PR is either merged or definitively rejected for being out of scope (or any one of many other valid reasons). |
Contributor
Author
|
Now that the sendspin-rs changes have been merged, closing this in favor of Sendspin/sendspin-rs#10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add configurable volume control mode (Auto/Hardware/Software/Disabled) that resolves at connection time based on user preference and hardware availability. Software mode applies a perceptual power curve ((vol/100)^4) with 20ms linear ramping to prevent clicks.
Known limitation: gain applied at enqueue time, not playback time. SyncedPlayer buffers ~2s ahead, so software volume changes have latency until/unless sendspin-rs adds a post-processing callback. I added a tool-tip to that effect.