volume: Add LFE balance API

System Internals / PulseAudio - David Henningsson [canonical.com] - 30 October 2015 02:13 UTC

The gnome/unity-control-center UIs have a master volume slider, and three sub-sliders: balance, fade, and subwoofer. Balance and fade use PA's set_balance and set_fade APIs accordingly, but the subwoofer slider sometimes does unintuitive things.

In order to make that slider behave better, let's add a LFE balance API that these volume control UIs can use instead. With this API, the UI can balance between "no subwoofer" and "only subwoofer" with "equal balance" in the middle, which would make it more consistent with the behaviour of the other sliders.

BugLink: https://bugzilla.gnome.org/show_bug.cgi?id=753847

9fecb6e volume: Add LFE balance API
src/map-file | 3 +++
src/pulse/channelmap.c | 13 +++++++++++++
src/pulse/channelmap.h | 5 +++++
src/pulse/volume.c | 42 +++++++++++++++++++++++++++++++++++++++++-
src/pulse/volume.h | 18 ++++++++++++++++++
src/pulsecore/sample-util.h | 8 ++++++++
6 files changed, 88 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share