sink, source: Use the global configuration for the avoid_resampling default
authorTanu Kaskinen <tanuk@iki.fi>
Sun, 21 Jun 2020 15:23:14 +0000 (18:23 +0300)
committerArun Raghavan <arun@arunraghavan.net>
Mon, 22 Jun 2020 14:47:42 +0000 (14:47 +0000)
commit04c554b7d5ece918e4c5456bec491380b8d24791
treefa8134497afb80dc794fbd3ed14ca12a20daec74
parentd97075c79f566e808c17f787a4a24240330ebe82
sink, source: Use the global configuration for the avoid_resampling default

Previously avoid_resampling was always false unless the sink or source
implementation explicitly configured the variable. The null sink doesn't
explicitly configure it, so it didn't switch the sample rate as
expected when avoid_resampling was enabled.

This change means that also sinks that don't support rate switching can
have avoid_resampling set to true, but I think that's fine, because
pa_sink_reconfigure() doesn't try to do anything if the reconfigure()
callback isn't set.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/923
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c
src/pulsecore/sink.c
src/pulsecore/sink.h
src/pulsecore/source.c
src/pulsecore/source.h