From 5fa76102642a6faf043922e0e60f0b1cae1d84da Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jul 2019 19:03:00 +0200 Subject: pcm/Volume: Open() returns output sample format Prepare for a new mode which may convert to a different sample format when applying volume, to reduce dithering. --- src/filter/plugins/ReplayGainFilterPlugin.cxx | 2 +- src/filter/plugins/VolumeFilterPlugin.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/filter') diff --git a/src/filter/plugins/ReplayGainFilterPlugin.cxx b/src/filter/plugins/ReplayGainFilterPlugin.cxx index 8260ced70..43906fb63 100644 --- a/src/filter/plugins/ReplayGainFilterPlugin.cxx +++ b/src/filter/plugins/ReplayGainFilterPlugin.cxx @@ -77,7 +77,7 @@ public: mixer(_mixer), base(_base) { info.Clear(); - pv.Open(out_audio_format.format); + out_audio_format.format = pv.Open(out_audio_format.format); } void SetInfo(const ReplayGainInfo *_info) { diff --git a/src/filter/plugins/VolumeFilterPlugin.cxx b/src/filter/plugins/VolumeFilterPlugin.cxx index d10f5d1b4..8ebf6c97b 100644 --- a/src/filter/plugins/VolumeFilterPlugin.cxx +++ b/src/filter/plugins/VolumeFilterPlugin.cxx @@ -30,7 +30,7 @@ class VolumeFilter final : public Filter { public: explicit VolumeFilter(const AudioFormat &audio_format) :Filter(audio_format) { - pv.Open(out_audio_format.format); + out_audio_format.format = pv.Open(out_audio_format.format); } unsigned GetVolume() const noexcept { -- cgit v1.2.3