mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-03-06 01:40:18 -05:00
lfe-filter: change the crossover frequency as a parameter
Add a user defined parameter lfe-crossover-freq for the lfe-filter, to pass this parameter to the lfe-filter, we need to change the pa_resampler_new() API as well. Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
3538e6636e
commit
c36e191ce5
14 changed files with 28 additions and 8 deletions
|
|
@ -320,6 +320,7 @@ pa_resampler* pa_resampler_new(
|
|||
const pa_channel_map *am,
|
||||
const pa_sample_spec *b,
|
||||
const pa_channel_map *bm,
|
||||
unsigned crossover_freq,
|
||||
pa_resample_method_t method,
|
||||
pa_resample_flags_t flags) {
|
||||
|
||||
|
|
@ -418,9 +419,8 @@ pa_resampler* pa_resampler_new(
|
|||
if (lfe_filter_required) {
|
||||
pa_sample_spec wss = r->o_ss;
|
||||
wss.format = r->work_format;
|
||||
/* TODO: Temporary code that sets crossover freq to 120 Hz. This should be a parameter */
|
||||
r->lfe_filter = pa_lfe_filter_new(&wss, &r->o_cm, 120.0f);
|
||||
pa_log_debug(" lfe filter activated (LR4 type)");
|
||||
r->lfe_filter = pa_lfe_filter_new(&wss, &r->o_cm, (float)crossover_freq);
|
||||
pa_log_debug(" lfe filter activated (LR4 type), the crossover_freq = %uHz", crossover_freq);
|
||||
}
|
||||
|
||||
/* initialize implementation */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue