mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
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>
This commit is contained in:
parent
387a244cd9
commit
9fecb6eb32
6 changed files with 88 additions and 1 deletions
|
|
@ -126,6 +126,14 @@ size_t pa_convert_size(size_t size, const pa_sample_spec *from, const pa_sample_
|
|||
| PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_TOP_REAR_RIGHT) \
|
||||
| PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_TOP_REAR_CENTER))
|
||||
|
||||
#define PA_CHANNEL_POSITION_MASK_LFE \
|
||||
PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_LFE)
|
||||
|
||||
#define PA_CHANNEL_POSITION_MASK_HFE \
|
||||
(PA_CHANNEL_POSITION_MASK_REAR | PA_CHANNEL_POSITION_MASK_FRONT \
|
||||
| PA_CHANNEL_POSITION_MASK_LEFT | PA_CHANNEL_POSITION_MASK_RIGHT \
|
||||
| PA_CHANNEL_POSITION_MASK_CENTER)
|
||||
|
||||
#define PA_CHANNEL_POSITION_MASK_SIDE_OR_TOP_CENTER \
|
||||
(PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_SIDE_LEFT) \
|
||||
| PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_SIDE_RIGHT) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue