[pulseaudio-discuss] [PATCH] resampler: Don't expose soxr methods if they are not supported

arun at accosted.net arun at accosted.net
Fri Nov 6 02:26:00 PST 2015


From: Arun Raghavan <git at arunraghavan.net>

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92780
---
 src/pulsecore/resampler.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index bf3fdb8..b683b05 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -685,6 +685,11 @@ int pa_resample_method_supported(pa_resample_method_t m) {
         return 0;
 #endif
 
+#ifndef HAVE_SOXR
+    if (m >= PA_RESAMPLER_SOXR_MQ && m <= PA_RESAMPLER_SOXR_VHQ)
+        return 0;
+#endif
+
     return 1;
 }
 
-- 
2.5.0



More information about the pulseaudio-discuss mailing list