mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-01 07:15:39 -04:00
channelmix: make up/downmix levels configurable
Add channelmix.center-level, channelmix.surround-level and channelmix.lfe-level to control how center, surround and LFE is up/downmixed. Fixes #5198
This commit is contained in:
parent
03f894bab0
commit
18c97222c4
12 changed files with 119 additions and 25 deletions
|
|
@ -54,7 +54,7 @@ static int setup_context(struct context *ctx)
|
|||
size_t size;
|
||||
int res;
|
||||
struct spa_support support[1];
|
||||
struct spa_dict_item items[6];
|
||||
struct spa_dict_item items[9];
|
||||
const struct spa_handle_factory *factory;
|
||||
void *iface;
|
||||
|
||||
|
|
@ -76,10 +76,13 @@ static int setup_context(struct context *ctx)
|
|||
items[3] = SPA_DICT_ITEM_INIT("channelmix.lfe-cutoff", "150");
|
||||
items[4] = SPA_DICT_ITEM_INIT("channelmix.fc-cutoff", "12000");
|
||||
items[5] = SPA_DICT_ITEM_INIT("channelmix.rear-delay", "12.0");
|
||||
items[6] = SPA_DICT_ITEM_INIT("channelmix.center-level", "0.707106781");
|
||||
items[7] = SPA_DICT_ITEM_INIT("channelmix.surround-level", "0.707106781");
|
||||
items[8] = SPA_DICT_ITEM_INIT("channelmix.lfe-level", "0.5");
|
||||
|
||||
res = spa_handle_factory_init(factory,
|
||||
ctx->convert_handle,
|
||||
&SPA_DICT_INIT(items, 6),
|
||||
&SPA_DICT_INIT(items, 9),
|
||||
support, 1);
|
||||
spa_assert_se(res >= 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue