module: disable resample when following graph rate

When we don't set a rate, assume both input and output streams are
following the graph rate and so disable the resampler.

This mostly works around an issue where the input and output could
negotiate to different rates in some cases. With the resampler disabled
this would still result in the same amount of samples going in as
comming out instead of a stuttering mismatch.

See #2969
This commit is contained in:
Wim Taymans 2023-06-22 11:18:04 +02:00
parent 3db3e6dacf
commit ad5ac964af
3 changed files with 25 additions and 1 deletions

View file

@ -1375,6 +1375,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
if (pw_properties_get(props, "resample.prefill") == NULL)
pw_properties_set(props, "resample.prefill", "true");
if (pw_properties_get(props, "resample.disable") == NULL)
pw_properties_set(props, "resample.disable", "true");
if (pw_properties_get(props, PW_KEY_MEDIA_CLASS) == NULL) {
if (impl->mode == MODE_SINK)