sink, source: Add a mode to avoid resampling if possible

This adds an "avoid-resampling" option to daemon.conf that makes the
daemon try to use the stream sample rate if possible (the device needs
to support it, which currently only ALSA does), and there should not be
any other stream connected).

This should enable some of the "audiophile" use-cases where users wish
to play high sample rate audio files without resampling.

We still will do conversion if sample formats don't match, though. This
means that if you want to play 96 kHz/24 bit audio without any
modification the default format will need to be set to be 24-bit as
well. This will force all streams to be upconverted, which, other than
the wasted resources, should be relatively harmless.
This commit is contained in:
Arun Raghavan 2017-01-28 13:19:08 +05:30
parent 5e1bb023a2
commit cc021c7330
8 changed files with 30 additions and 4 deletions

View file

@ -123,6 +123,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
resampler to use.</p>
</option>
<option>
<p><opt>avoid-resampling=</opt> If set, try to configure the
device to avoid resampling. This only works on devices which
support reconfiguring their rate, and when no other streams are
already playing or capturing audio. The device will also not be
configured to a rate less than the default and alternate sample
rates.</p>
</option>
<option>
<p><opt>enable-remixing=</opt> If disabled never upmix or
downmix channels to different channel maps. Instead, do a simple