volume: Add LFE balance API
authorDavid Henningsson <david.henningsson@canonical.com>
Tue, 27 Oct 2015 08:54:39 +0000 (09:54 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 30 Oct 2015 07:13:10 +0000 (09:13 +0200)
commit9fecb6eb32d19b5f2dfc194426b7b3cd678a7520
treeea5f1b8489fb57387f513cf9b9cd8753cefae9dd
parent387a244cd92061ecedd3cc97c6f87ece44b65a91
volume: Add LFE balance API

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
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/map-file
src/pulse/channelmap.c
src/pulse/channelmap.h
src/pulse/volume.c
src/pulse/volume.h
src/pulsecore/sample-util.h