mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
audioconvert: improve noise shaping
Reorganize things a little so we can add more noise shapers. Add sloped triangular noise. Add wanamaker3 noise shaping.
This commit is contained in:
parent
7151150802
commit
a4db745a7e
6 changed files with 272 additions and 171 deletions
|
|
@ -656,7 +656,7 @@ static void run_test_noise(uint32_t fmt, uint32_t noise, uint32_t flags)
|
|||
|
||||
spa_zero(conv);
|
||||
|
||||
conv.noise = noise;
|
||||
conv.noise_bits = noise;
|
||||
conv.src_fmt = SPA_AUDIO_FORMAT_F32P;
|
||||
conv.dst_fmt = fmt;
|
||||
conv.n_channels = 2;
|
||||
|
|
@ -672,7 +672,7 @@ static void run_test_noise(uint32_t fmt, uint32_t noise, uint32_t flags)
|
|||
}
|
||||
convert_process(&conv, op, ip, N_SAMPLES);
|
||||
|
||||
range = 1 << conv.noise;
|
||||
range = 1 << conv.noise_bits;
|
||||
|
||||
all_zero = true;
|
||||
for (i = 0; i < conv.n_channels * N_SAMPLES; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue