[pulseaudio-commits] 2 commits - man/pulse-daemon.conf.5.xml.in src/pulsecore
David Henningsson
diwic at kemper.freedesktop.org
Mon Mar 30 06:17:31 PDT 2015
man/pulse-daemon.conf.5.xml.in | 2 +-
src/pulsecore/resampler.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 2cfc5df87faa1ba642afa1ccc7f4c9b920139a79
Author: David Henningsson <david.henningsson at canonical.com>
Date: Mon Mar 30 15:12:53 2015 +0200
resampler: Rename "lfe_filter_required" to "lfe_remixed"
Just refactoring to make the variable name better.
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 2a54cec..5478e6d 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -40,7 +40,7 @@ struct ffmpeg_data { /* data specific to ffmpeg */
static int copy_init(pa_resampler *r);
-static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_filter_required);
+static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_remixed);
static void free_remap(pa_remap_t *m);
static int (* const init_table[])(pa_resampler *r) = {
@@ -325,7 +325,7 @@ pa_resampler* pa_resampler_new(
pa_resample_flags_t flags) {
pa_resampler *r = NULL;
- bool lfe_filter_required = false;
+ bool lfe_remixed = false;
pa_assert(pool);
pa_assert(a);
@@ -414,9 +414,9 @@ pa_resampler* pa_resampler_new(
/* set up the remap structure */
if (r->map_required)
- setup_remap(r, &r->remap, &lfe_filter_required);
+ setup_remap(r, &r->remap, &lfe_remixed);
- if (lfe_filter_required && crossover_freq > 0) {
+ if (lfe_remixed && crossover_freq > 0) {
pa_sample_spec wss = r->o_ss;
wss.format = r->work_format;
/* FIXME: For now just hardcode maxrewind to 3 seconds */
@@ -789,7 +789,7 @@ static int front_rear_side(pa_channel_position_t p) {
return ON_OTHER;
}
-static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_filter_required) {
+static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_remixed) {
unsigned oc, ic;
unsigned n_oc, n_ic;
bool ic_connected[PA_CHANNELS_MAX];
@@ -798,7 +798,7 @@ static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_filter_r
pa_assert(r);
pa_assert(m);
- pa_assert(lfe_filter_required);
+ pa_assert(lfe_remixed);
n_oc = r->o_ss.channels;
n_ic = r->i_ss.channels;
@@ -811,7 +811,7 @@ static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_filter_r
memset(m->map_table_i, 0, sizeof(m->map_table_i));
memset(ic_connected, 0, sizeof(ic_connected));
- *lfe_filter_required = false;
+ *lfe_remixed = false;
if (r->flags & PA_RESAMPLER_NO_REMAP) {
for (oc = 0; oc < PA_MIN(n_ic, n_oc); oc++)
@@ -925,7 +925,7 @@ static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_filter_r
ic_connected[ic] = true;
if (a == PA_CHANNEL_POSITION_MONO && on_lfe(b) && !(r->flags & PA_RESAMPLER_NO_LFE))
- *lfe_filter_required = true;
+ *lfe_remixed = true;
}
else if (b == PA_CHANNEL_POSITION_MONO) {
m->map_table_f[oc][ic] = 1.0f / (float) n_ic;
@@ -1009,7 +1009,7 @@ static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_filter_r
/* Please note that a channel connected to LFE doesn't
* really count as connected. */
- *lfe_filter_required = true;
+ *lfe_remixed = true;
}
}
}
commit c65a606ae73c9f9fa7bed4aade575395f4ff1890
Author: David Henningsson <david.henningsson at canonical.com>
Date: Mon Mar 30 11:10:56 2015 +0200
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 at canonical.com>
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 */
More information about the pulseaudio-commits
mailing list