libmpv: allow volume boost up to 130% (fix volume clamped at 100)#11649
Merged
Conversation
The volume slider and VolumeMaximum advertise a maximum of 130, but the LibMpvDynamicPlayer.Volume setter clamped the value to 100 before passing it to mpv. This made the top of the slider (100..130) a no-op, so users could never amplify audio above unity gain. mpv's default volume-max is 130 (== MaxVolume), so clamping to MaxVolume instead of 100 enables the intended boost range. Relates to #11647. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The volume slider and
LibMpvDynamicPlayer.VolumeMaximum/MaxVolumeadvertise a maximum of 130, but theVolumesetter clamped the value to 100 before handing it to mpv:So the upper part of the slider (100..130) was a no-op — mpv never received anything above unity gain, and users could not amplify audio above the source's natural level. (The
LibVlcDynamicPlayerpath already scales correctly to its 130 max; only the mpv path was wrong.)Fix
Clamp to
MaxVolumeinstead of the hardcoded 100. mpv's defaultvolume-maxis 130 (==MaxVolume), so values above 100 boost (amplify) the audio as intended.Context
Relates to #11647 (RC4 / Fedora: audio extremely low). This is not a full fix for that report — the underlying "extremely low" baseline there is most likely environmental (PipeWire per-app stream level / multichannel downmix, and embedded libmpv not loading the user's
mpv.conf). But the clamp meant SubtitleEdit users had no way to compensate above unity gain even though the UI offered it. This restores the intended boost headroom.🤖 Generated with Claude Code