summaryrefslogtreecommitdiffstats
path: root/polyp/sink-input.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-17 21:10:05 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-17 21:10:05 +0000
commit61ec86c90f1964ab9663b7a72a0885078d372683 (patch)
treeb5409bf14cb0f01d3256f5901b00e58300d7617a /polyp/sink-input.c
parent08953564bb85356869a1f043b82d1f365c8729a1 (diff)
add resample_method option module-combine
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@215 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/sink-input.c')
-rw-r--r--polyp/sink-input.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/polyp/sink-input.c b/polyp/sink-input.c
index 486a2044..94930231 100644
--- a/polyp/sink-input.c
+++ b/polyp/sink-input.c
@@ -36,7 +36,7 @@
#define CONVERT_BUFFER_LENGTH 4096
-struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, const struct pa_sample_spec *spec, int variable_rate) {
+struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, const struct pa_sample_spec *spec, int variable_rate, int resample_method) {
struct pa_sink_input *i;
struct pa_resampler *resampler = NULL;
int r;
@@ -47,9 +47,12 @@ struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, con
pa_log(__FILE__": Failed to create sink input: too many inputs per sink.\n");
return NULL;
}
+
+ if (resample_method < 0)
+ resample_method = s->core->resample_method;
if (variable_rate || !pa_sample_spec_equal(spec, &s->sample_spec))
- if (!(resampler = pa_resampler_new(spec, &s->sample_spec, s->core->memblock_stat, s->core->resample_method)))
+ if (!(resampler = pa_resampler_new(spec, &s->sample_spec, s->core->memblock_stat, resample_method)))
return NULL;
i = pa_xmalloc(sizeof(struct pa_sink_input));