channelmix: add more generic upmixing

Add options to enable lfe filtering and upmix.
Enable upmix by default, lfe is disabled because we don't actually
do a lowpass filter yet.
This commit is contained in:
Wim Taymans 2021-03-06 21:31:18 +01:00
parent c7309f0248
commit 6324298bc5
6 changed files with 67 additions and 17 deletions

View file

@ -1250,6 +1250,12 @@ impl_init(const struct spa_handle_factory *factory,
if ((str = spa_dict_lookup(info, "channelmix.mix-lfe")) != NULL &&
(strcmp(str, "true") == 0 || atoi(str) != 0))
this->mix.options |= CHANNELMIX_OPTION_MIX_LFE;
if ((str = spa_dict_lookup(info, "channelmix.upmix")) != NULL &&
(strcmp(str, "true") == 0 || atoi(str) != 0))
this->mix.options |= CHANNELMIX_OPTION_UPMIX;
if ((str = spa_dict_lookup(info, "channelmix.filter-lfe")) != NULL &&
(strcmp(str, "true") == 0 || atoi(str) != 0))
this->mix.options |= CHANNELMIX_OPTION_FILTER_LFE;
if ((str = spa_dict_lookup(info, SPA_KEY_AUDIO_POSITION)) != NULL) {
size_t len;
const char *p = str;