channelmix: Prepare for generating LFE channel

Add channelmix.lfe-cutoff property, 0 is disabled
Disable upmix by default
This commit is contained in:
Wim Taymans 2021-03-17 11:09:19 +01:00
parent 4200ca98d6
commit e51cc5b537
7 changed files with 27 additions and 20 deletions

View file

@ -49,7 +49,6 @@ struct channelmix {
#define CHANNELMIX_OPTION_MIX_LFE (1<<0) /**< mix LFE */
#define CHANNELMIX_OPTION_NORMALIZE (1<<1) /**< normalize volumes */
#define CHANNELMIX_OPTION_UPMIX (1<<2) /**< do simple upmixing */
#define CHANNELMIX_OPTION_FILTER_LFE (1<<3) /**< generate and filter LFE */
uint32_t options;
struct spa_log *log;
@ -62,6 +61,9 @@ struct channelmix {
float matrix_orig[SPA_AUDIO_MAX_CHANNELS][SPA_AUDIO_MAX_CHANNELS];
float matrix[SPA_AUDIO_MAX_CHANNELS][SPA_AUDIO_MAX_CHANNELS];
float freq; /* sample frequency */
float lfe_cutoff; /* in Hz, 0 is disabled */
void (*process) (struct channelmix *mix, uint32_t n_dst, void * SPA_RESTRICT dst[n_dst],
uint32_t n_src, const void * SPA_RESTRICT src[n_src], uint32_t n_samples);
void (*set_volume) (struct channelmix *mix, float volume, bool mute,