mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
audioconvert: add optional hilbert transform to rear channels
Add an option to do a hilbert transform on the generated rear channels to do a 90 degree pahse shift on them. This can improve spacialization of the rear channels. See #861
This commit is contained in:
parent
5dd0a12875
commit
5b3388e4ac
9 changed files with 121 additions and 17 deletions
|
|
@ -48,6 +48,9 @@ extern struct spa_log_topic *log_topic;
|
|||
|
||||
#define BUFFER_SIZE 4096
|
||||
|
||||
#define BUFFER_SIZE 4096
|
||||
#define MAX_TAPS 255
|
||||
|
||||
struct channelmix {
|
||||
uint32_t src_chan;
|
||||
uint32_t dst_chan;
|
||||
|
|
@ -73,11 +76,14 @@ struct channelmix {
|
|||
float lfe_cutoff; /* in Hz, 0 is disabled */
|
||||
float rear_delay; /* in ms, 0 is disabled */
|
||||
float widen; /* stereo widen. 0 is disabled */
|
||||
uint32_t hilbert_taps; /* to phase shift, 0 disabled */
|
||||
struct lr4 lr4[SPA_AUDIO_MAX_CHANNELS];
|
||||
|
||||
float buffer[2][BUFFER_SIZE];
|
||||
uint32_t pos[2];
|
||||
uint32_t delay;
|
||||
float taps[MAX_TAPS];
|
||||
uint32_t n_taps;
|
||||
|
||||
void (*process) (struct channelmix *mix, void * SPA_RESTRICT dst[],
|
||||
const void * SPA_RESTRICT src[], uint32_t n_samples);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue