From cc021c73305023a113f78190fb1b995528d003ae Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Sat, 28 Jan 2017 13:19:08 +0530 Subject: [PATCH] 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. --- man/pulse-daemon.conf.5.xml.in | 9 +++++++++ src/daemon/daemon-conf.c | 3 +++ src/daemon/daemon-conf.h | 1 + src/daemon/daemon.conf.in | 1 + src/daemon/main.c | 1 + src/pulsecore/core.h | 1 + src/pulsecore/sink.c | 9 +++++++-- src/pulsecore/source.c | 9 +++++++-- 8 files changed, 30 insertions(+), 4 deletions(-) diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in index b81a5493f..f0550f3b1 100644 --- a/man/pulse-daemon.conf.5.xml.in +++ b/man/pulse-daemon.conf.5.xml.in @@ -123,6 +123,15 @@ License along with PulseAudio; if not, see . resampler to use.

+ +