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

@ -1036,6 +1036,7 @@ int main(int argc, char *argv[]) {
c->resample_method = conf->resample_method;
c->realtime_priority = conf->realtime_priority;
c->realtime_scheduling = conf->realtime_scheduling;
c->avoid_resampling = conf->avoid_resampling;
c->disable_remixing = conf->disable_remixing;
c->remixing_use_all_sink_channels = conf->remixing_use_all_sink_channels;
c->disable_lfe_remixing = conf->disable_lfe_remixing;