lfe-filter: Enable LFE filter in the resampler

When enable-lfe-remixing is set, an LFE channel is present in the
resampler's destination channel map but not in the source channel map,
we insert a low-pass filter instead of just averaging the channels.
Other channels will get a high-pass filter.

In this patch, the crossover frequency is hardcoded to 120Hz (to be fixed
in later patches).

Note that in current state the LFE filter is
 - not very optimised
 - not rewind friendly (rewinding can cause audible artifacts)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2015-03-24 10:29:13 +01:00
parent f3ebf6b667
commit 979f19a434
7 changed files with 266 additions and 6 deletions

View file

@ -26,6 +26,7 @@
#include <pulsecore/memchunk.h>
#include <pulsecore/sconv.h>
#include <pulsecore/remap.h>
#include <pulsecore/filter/lfe-filter.h>
typedef struct pa_resampler pa_resampler;
typedef struct pa_resampler_impl pa_resampler_impl;
@ -106,6 +107,8 @@ struct pa_resampler {
pa_remap_t remap;
bool map_required;
pa_lfe_filter_t *lfe_filter;
pa_resampler_impl impl;
};