[pulseaudio-discuss] [PATCH 0/5] volume: Decrease PA_VOLUME_MAX to be < 2^31

Arun Raghavan arun.raghavan at collabora.co.uk
Sat Oct 9 11:27:09 PDT 2010


Hey folks,
Here's a patchset to change PA_VOLUME_MAX to (2^31-1), which is about half its
current value. This really should not impact anything significantly, since the
maximum gain we can apply decreases from ~289 dB to ~271 dB. Why this change is
good is that we can significantly simplify the software volume scaling
arithmetic, since the volume can always be treated as a signed number.

I am working on rewriting the volume scaling in Orc, and this would make that
considerably simpler (and more fruitful, since we'd have to jump through hoops
to deal with volumes >= 2^31 while doing signed multiplication). If we choose
to retain the old hand-optimised assembly, that should also benefit from this
change.

I have intentionally not revised the protocol version since I think it is fair
to consider the actual value of PA_VOLUME_MAX as internal, but I'm open to
being corrected if this is not true.

I would actually like to decrease the maximum volume to a much saner value, but
I will start that discussion in a separate thread.

Comments/brickbats welcome.

Cheers,
Arun




More information about the pulseaudio-discuss mailing list