resampler: Allow disabling the LFE filter by setting crossover to 0

When crossover_freq is set to 0, this restores the old behaviour
of letting the LFE channel be the average of the source channels,
without additional processing. This can be useful e g in case the
user already has a hardware crossover.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2015-03-30 11:10:56 +02:00
parent a9059be749
commit c65a606ae7
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>lfe-crossover-freq=</opt> The crossover frequency (in Hz) for the
LFE filter. Defaults to 120 Hz.</p>
LFE filter. Defaults to 120 Hz. Set it to 0 to disable the LFE filter.</p>
</option>
<option>

View file

@ -416,7 +416,7 @@ pa_resampler* pa_resampler_new(
if (r->map_required)
setup_remap(r, &r->remap, &lfe_filter_required);
if (lfe_filter_required) {
if (lfe_filter_required && crossover_freq > 0) {
pa_sample_spec wss = r->o_ss;
wss.format = r->work_format;
/* FIXME: For now just hardcode maxrewind to 3 seconds */