From 45a5e6f0f160326b5160853a9c2a5c83f3bce3bc Mon Sep 17 00:00:00 2001 From: Georg Chini Date: Tue, 26 Mar 2019 10:32:12 +0100 Subject: [PATCH] combine-sink: Use configured resampler, reduce update time to 1s Currently the combine-sink uses the trivial resampler by default. This patch changes the default to the configured resampler. Also the default update time is changed from 10s to 1s to achieve faster convergence and higher precision. Part-of: --- src/modules/module-combine-sink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c index c27a77ee2..74b5fd416 100644 --- a/src/modules/module-combine-sink.c +++ b/src/modules/module-combine-sink.c @@ -65,7 +65,7 @@ PA_MODULE_USAGE( #define MEMBLOCKQ_MAXLENGTH (1024*1024*16) -#define DEFAULT_ADJUST_TIME_USEC (10*PA_USEC_PER_SEC) +#define DEFAULT_ADJUST_TIME_USEC (1*PA_USEC_PER_SEC) #define BLOCK_USEC (PA_USEC_PER_MSEC * 200) @@ -1423,7 +1423,7 @@ int pa__init(pa_module*m) { struct userdata *u; pa_modargs *ma = NULL; const char *slaves, *rm; - int resample_method = PA_RESAMPLER_TRIVIAL; + int resample_method; pa_sample_spec ss; pa_channel_map map; struct output *o; @@ -1439,6 +1439,7 @@ int pa__init(pa_module*m) { goto fail; } + resample_method = m->core->resample_method; if ((rm = pa_modargs_get_value(ma, "resample_method", NULL))) { if ((resample_method = pa_parse_resample_method(rm)) < 0) { pa_log("invalid resample method '%s'", rm);