mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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
|
|
@ -46,13 +46,15 @@ struct channelmix {
|
|||
uint64_t src_mask;
|
||||
uint64_t dst_mask;
|
||||
uint32_t cpu_flags;
|
||||
#define CHANNELMIX_OPTION_MIX_LFE (1<<0) /**< mix LFE */
|
||||
uint32_t options;
|
||||
|
||||
struct spa_log *log;
|
||||
|
||||
unsigned int zero:1; /* all zero components */
|
||||
unsigned int identity:1; /* identity matrix */
|
||||
unsigned int norm:1; /* all normal values */
|
||||
unsigned int equal:1; /* all values are equal */
|
||||
#define CHANNELMIX_FLAG_ZERO (1<<0) /**< all zero components */
|
||||
#define CHANNELMIX_FLAG_IDENTITY (1<<1) /**< identity matrix */
|
||||
#define CHANNELMIX_FLAG_EQUAL (1<<2) /**< all values are equal */
|
||||
uint32_t flags;
|
||||
float matrix_orig[SPA_AUDIO_MAX_CHANNELS][SPA_AUDIO_MAX_CHANNELS];
|
||||
float matrix[SPA_AUDIO_MAX_CHANNELS][SPA_AUDIO_MAX_CHANNELS];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue