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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 at canonical.com>
---
 man/pulse-daemon.conf.5.xml.in | 2 +-
 src/pulsecore/resampler.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index bc91a5a..d221585 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -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>
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index f5a0e16..2a54cec 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -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 */
-- 
1.9.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux