mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-18 21:37:41 -04:00
audioconvert: add dither noise even on empty input
When we are asked to add noise bits, don't call the clear function. Make the passthrough and clear-on-empty flags available with a new flag field to make it more extensible. Fixes #5260
This commit is contained in:
parent
4f975d0071
commit
61431dcbc0
3 changed files with 17 additions and 11 deletions
|
|
@ -640,7 +640,8 @@ int convert_init(struct convert *conv)
|
|||
for (i = 0; i < RANDOM_SIZE; i++)
|
||||
conv->random[i] = random();
|
||||
|
||||
conv->is_passthrough = conv->src_fmt == conv->dst_fmt;
|
||||
SPA_FLAG_UPDATE(conv->flags, CONVERT_FLAG_CLEAR_ON_EMPTY, conv->noise_bits == 0);
|
||||
SPA_FLAG_UPDATE(conv->flags, CONVERT_FLAG_PASSTHROUGH, conv->src_fmt == conv->dst_fmt);
|
||||
conv->func_cpu_flags = info->cpu_flags;
|
||||
conv->update_noise = ninfo->noise;
|
||||
conv->process = info->process;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue