summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/resampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/resampler.c')
-rw-r--r--src/pulsecore/resampler.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index f0515ebe..be390db7 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -25,7 +25,7 @@
#include <string.h>
-#if HAVE_LIBSAMPLERATE
+#ifdef HAVE_LIBSAMPLERATE
#include <samplerate.h>
#endif
@@ -257,8 +257,12 @@ pa_resampler* pa_resampler_new(
if (a->format == PA_SAMPLE_S32NE || a->format == PA_SAMPLE_S32RE ||
a->format == PA_SAMPLE_FLOAT32NE || a->format == PA_SAMPLE_FLOAT32RE ||
+ a->format == PA_SAMPLE_S24NE || a->format == PA_SAMPLE_S24RE ||
+ a->format == PA_SAMPLE_S24_32NE || a->format == PA_SAMPLE_S24_32RE ||
b->format == PA_SAMPLE_S32NE || b->format == PA_SAMPLE_S32RE ||
- b->format == PA_SAMPLE_FLOAT32NE || b->format == PA_SAMPLE_FLOAT32RE)
+ b->format == PA_SAMPLE_FLOAT32NE || b->format == PA_SAMPLE_FLOAT32RE ||
+ b->format == PA_SAMPLE_S24NE || b->format == PA_SAMPLE_S24RE ||
+ b->format == PA_SAMPLE_S24_32NE || b->format == PA_SAMPLE_S24_32RE)
r->work_format = PA_SAMPLE_FLOAT32NE;
else
r->work_format = PA_SAMPLE_S16NE;
@@ -399,6 +403,30 @@ pa_resample_method_t pa_resampler_get_method(pa_resampler *r) {
return r->method;
}
+const pa_channel_map* pa_resampler_input_channel_map(pa_resampler *r) {
+ pa_assert(r);
+
+ return &r->i_cm;
+}
+
+const pa_sample_spec* pa_resampler_input_sample_spec(pa_resampler *r) {
+ pa_assert(r);
+
+ return &r->i_ss;
+}
+
+const pa_channel_map* pa_resampler_output_channel_map(pa_resampler *r) {
+ pa_assert(r);
+
+ return &r->o_cm;
+}
+
+const pa_sample_spec* pa_resampler_output_sample_spec(pa_resampler *r) {
+ pa_assert(r);
+
+ return &r->o_ss;
+}
+
static const char * const resample_methods[] = {
"src-sinc-best-quality",
"src-sinc-medium-quality",