mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
channelmix: normalize volumes
Normalize the volumes. Don't mix in LFE by default but add an option Move some booleans to flags Improve some checks for fastpaths.
This commit is contained in:
parent
289a8e86ca
commit
f7d8fef070
5 changed files with 89 additions and 81 deletions
|
|
@ -256,11 +256,11 @@ static int setup_convert(struct impl *this,
|
|||
|
||||
emit_params_changed(this);
|
||||
|
||||
spa_log_debug(this->log, NAME " %p: got channelmix features %08x:%08x identity:%d",
|
||||
spa_log_debug(this->log, NAME " %p: got channelmix features %08x:%08x flags:%08x",
|
||||
this, this->cpu_flags, this->mix.cpu_flags,
|
||||
this->mix.identity);
|
||||
this->mix.flags);
|
||||
|
||||
this->is_passthrough = this->mix.identity;
|
||||
this->is_passthrough = SPA_FLAG_IS_SET(this->mix.flags, CHANNELMIX_FLAG_IDENTITY);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1057,7 +1057,9 @@ static int impl_node_process(void *object)
|
|||
void *dst_datas[n_dst_datas];
|
||||
bool is_passthrough;
|
||||
|
||||
is_passthrough = this->is_passthrough && this->mix.identity && ctrlport->ctrl == NULL;
|
||||
is_passthrough = this->is_passthrough &&
|
||||
SPA_FLAG_IS_SET(this->mix.flags, CHANNELMIX_FLAG_IDENTITY) &&
|
||||
ctrlport->ctrl == NULL;
|
||||
|
||||
n_samples = sb->datas[0].chunk->size / inport->stride;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue