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

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Mar 30 05:53:33 PDT 2015


On Mon, 2015-03-30 at 11:16 +0200, David Henningsson wrote:
> 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) {

"lfe_filter_required" is a bad variable name, if it can be true when
there's actually no need for an LFE filter. Suggestion: rename it to
"lfe_synthesis_required".

-- 
Tanu



More information about the pulseaudio-discuss mailing list