Skip to content

Fix compounded/incorrect volume curve on the software volume control - #76

Open
R1DEN wants to merge 1 commit into
briankendall:masterfrom
R1DEN:master
Open

R1DEN wants to merge 1 commit into
briankendall:masterfrom
R1DEN:master

Conversation

@R1DEN

@R1DEN R1DEN commented Sep 28, 2026

Copy link
Copy Markdown

The volume control was applying three compounding transforms instead of one audio taper:

  • calculateVolumeFactors() used a dB/10 power-ratio exponent instead of the dB/20 amplitude-ratio exponent that applies to PCM samples.
  • The scalar<->dB getter/setter paths additionally squared or square rooted the value on top of that, so the audible curve was the composition of two mismatched exponential transforms.

Fix: remove the extra squaring/sqrt from the four scalar<->dB conversion sites and correct calculateVolumeFactors() to the standard linear-in-dB audio taper (10^(dB/20)), so there is exactly one curve applied end to end. Also widen kVolume_MinDB from -25dB to -40dB to give the taper more usable range at the low end.

Subjectively now the volume slider feels much more "linear" to the ear.

The volume control was applying three compounding transforms instead
of one audio taper:

- calculateVolumeFactors() used a dB/10 power-ratio exponent instead
  of the dB/20 amplitude-ratio exponent that applies to PCM samples.
- The scalar<->dB getter/setter paths additionally squared or square
  rooted the value on top of that, so the audible curve was the
  composition of two mismatched exponential transforms.

Fix: remove the extra squaring/sqrt from the four scalar<->dB
conversion sites and correct calculateVolumeFactors() to the standard
linear-in-dB audio taper (10^(dB/20)), so there is exactly one curve
applied end to end. Also widen kVolume_MinDB from -25dB to -40dB to
give the taper more usable range at the low end.
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.

1 participant