[pulseaudio-discuss] [PATCH 0/5] volume: Decrease PA_VOLUME_MAX to be < 2^31
David Henningsson
david.henningsson at canonical.com
Sun Oct 10 01:19:48 PDT 2010
On 2010-10-09 20:27, Arun Raghavan wrote:
> 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,
Could you elaborate on this? Is Orc a programming language? Are you
saying that native PulseAudio should only compile on compilers that have
"Orc" support?
> 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'm not exactly sure where and for what PA_VOLUME_MAX is used, but does
it correspond to 0 dB in any way? Thinking assembly, could it be that we
have some e g fixed-point arithmetic that we must compensate?
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
More information about the pulseaudio-discuss
mailing list