summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2012-11-25 20:46:38 (GMT)
committerSjoerd Simons <sjoerd@luon.net>2012-11-25 20:46:38 (GMT)
commitde901e9d4fe8c55e9ed1bfc06527e6df3a287888 (patch)
treefed6fe7302adfdbc53cba578abd71588ed67bff9
parent32382f01bb65cc81acb835b79ef6f64935bc9524 (diff)
downloadpulseaudio-resampler-settings.tar.gz
pulseaudio-resampler-settings.tar.xz
Use the fixed point speex resampler on ARMresampler-settings
Switch to use the speex fixed point resampler method by default on ARM. Traditionately there wasn't any standard floating point hardware, so for those machines it's an obvious choise. On machine using the hardfloat ABI floating point still isn't an obvious win over integer performance, it's of equal performance on some machines, but slower on others.
-rw-r--r--src/pulsecore/core.c4
-rw-r--r--src/pulsecore/resampler.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
index a9f1b7d..38f0d9b 100644
--- a/src/pulsecore/core.c
+++ b/src/pulsecore/core.c
@@ -141,7 +141,11 @@ 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;
+#ifdef __arm__
+ c->resample_method = PA_RESAMPLER_SPEEX_FIXED_BASE + 1;
+#else
c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 1;
+#endif
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 5f8e9bd..30817cb 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -235,7 +235,11 @@ pa_resampler* pa_resampler_new(
if (method == PA_RESAMPLER_AUTO) {
#ifdef HAVE_SPEEX
+# ifdef __arm__
+ method = PA_RESAMPLER_SPEEX_FIXED_BASE + 1;
+# else
method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 1;
+# endif
#else
if (flags & PA_RESAMPLER_VARIABLE_RATE)
method = PA_RESAMPLER_TRIVIAL;