From 92bb9fb8b5aeebb87c4df7416e75db1782e2dd3a Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 19 Nov 2012 15:08:34 +0530 Subject: [PATCH] resample: Switch to speex-float-1 by default This consumes less power, has low (no?) perceivable difference, and allows the default configuration to work out of the box on low-end systems (such as netbooks). --- man/pulse-daemon.conf.5.xml.in | 2 +- src/pulsecore/core.c | 2 +- src/pulsecore/resampler.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in index 744e94e5..2509ba14 100644 --- a/man/pulse-daemon.conf.5.xml.in +++ b/man/pulse-daemon.conf.5.xml.in @@ -100,7 +100,7 @@ USA. desktop CPUs the float point resampler is a lot faster, and it also offers slightly better quality. See the output of dump-resample-methods for a complete list of all - available resamplers. Defaults to speex-float-3. The + available resamplers. Defaults to speex-float-1. The --resample-method command line option takes precedence. Note that some modules overwrite or allow overwriting of the resampler to use.

diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index 98ad16e0..2ca50c23 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -141,7 +141,7 @@ pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size) { c->disable_remixing = FALSE; c->disable_lfe_remixing = FALSE; c->deferred_volume = TRUE; - c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 3; + c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 1; for (j = 0; j < PA_CORE_HOOK_MAX; j++) pa_hook_init(&c->hooks[j], c); diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c index 0a3a678c..bc45f065 100644 --- a/src/pulsecore/resampler.c +++ b/src/pulsecore/resampler.c @@ -236,7 +236,7 @@ pa_resampler* pa_resampler_new( if (method == PA_RESAMPLER_AUTO) { #ifdef HAVE_SPEEX - method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 3; + method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 1; #else if (flags & PA_RESAMPLER_VARIABLE_RATE) method = PA_RESAMPLER_TRIVIAL; @@ -565,10 +565,10 @@ pa_resample_method_t pa_parse_resample_method(const char *string) { return m; if (pa_streq(string, "speex-fixed")) - return PA_RESAMPLER_SPEEX_FIXED_BASE + 3; + return PA_RESAMPLER_SPEEX_FIXED_BASE + 1; if (pa_streq(string, "speex-float")) - return PA_RESAMPLER_SPEEX_FLOAT_BASE + 3; + return PA_RESAMPLER_SPEEX_FLOAT_BASE + 1; return PA_RESAMPLER_INVALID; } -- 2.39.2