aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/ConfiguredResampler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm/ConfiguredResampler.cxx')
-rw-r--r--src/pcm/ConfiguredResampler.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pcm/ConfiguredResampler.cxx b/src/pcm/ConfiguredResampler.cxx
index f562e4a2b..845fa2332 100644
--- a/src/pcm/ConfiguredResampler.cxx
+++ b/src/pcm/ConfiguredResampler.cxx
@@ -29,6 +29,10 @@
#include "LibsamplerateResampler.hxx"
#endif
+#ifdef HAVE_SOXR
+#include "SoxrResampler.hxx"
+#endif
+
#include <string.h>
enum class SelectedResampler {
@@ -37,6 +41,10 @@ enum class SelectedResampler {
#ifdef HAVE_LIBSAMPLERATE
LIBSAMPLERATE,
#endif
+
+#ifdef HAVE_SOXR
+ SOXR,
+#endif
};
static SelectedResampler selected_resampler = SelectedResampler::FALLBACK;
@@ -50,6 +58,13 @@ pcm_resampler_global_init(Error &error)
if (strcmp(converter, "internal") == 0)
return true;
+#ifdef HAVE_SOXR
+ if (strcmp(converter, "soxr") == 0) {
+ selected_resampler = SelectedResampler::SOXR;
+ return true;
+ }
+#endif
+
#ifdef HAVE_LIBSAMPLERATE
selected_resampler = SelectedResampler::LIBSAMPLERATE;
return pcm_resample_lsr_global_init(converter, error);
@@ -75,6 +90,11 @@ pcm_resampler_create()
case SelectedResampler::LIBSAMPLERATE:
return new LibsampleratePcmResampler();
#endif
+
+#ifdef HAVE_SOXR
+ case SelectedResampler::SOXR:
+ return new SoxrPcmResampler();
+#endif
}
gcc_unreachable();