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: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/53>
This commit is contained in:
Georg Chini 2019-03-26 10:32:12 +01:00 committed by PulseAudio Marge Bot
parent 9d1a43ae8d
commit 45a5e6f0f1

View file

@ -65,7 +65,7 @@ PA_MODULE_USAGE(
#define MEMBLOCKQ_MAXLENGTH (1024*1024*16) #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) #define BLOCK_USEC (PA_USEC_PER_MSEC * 200)
@ -1423,7 +1423,7 @@ int pa__init(pa_module*m) {
struct userdata *u; struct userdata *u;
pa_modargs *ma = NULL; pa_modargs *ma = NULL;
const char *slaves, *rm; const char *slaves, *rm;
int resample_method = PA_RESAMPLER_TRIVIAL; int resample_method;
pa_sample_spec ss; pa_sample_spec ss;
pa_channel_map map; pa_channel_map map;
struct output *o; struct output *o;
@ -1439,6 +1439,7 @@ int pa__init(pa_module*m) {
goto fail; goto fail;
} }
resample_method = m->core->resample_method;
if ((rm = pa_modargs_get_value(ma, "resample_method", NULL))) { if ((rm = pa_modargs_get_value(ma, "resample_method", NULL))) {
if ((resample_method = pa_parse_resample_method(rm)) < 0) { if ((resample_method = pa_parse_resample_method(rm)) < 0) {
pa_log("invalid resample method '%s'", rm); pa_log("invalid resample method '%s'", rm);