diff options
author | Max Kellermann <max@musicpd.org> | 2019-04-04 21:06:28 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-04-04 21:06:28 +0200 |
commit | 6addc9d6e0f172699636f3a2b4dd19e43b351747 (patch) | |
tree | cddc33bfb8b2e1c1d6a5bf701240e67503c284df /src | |
parent | e78d8250598e4a12bfe3fac4111927598aecdef4 (diff) |
pcm/PcmConvert: remove unused attribute "dest_format"
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm/PcmConvert.cxx | 20 | ||||
-rw-r--r-- | src/pcm/PcmConvert.hxx | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/pcm/PcmConvert.cxx b/src/pcm/PcmConvert.cxx index 6e57cf541..d78b3c1e8 100644 --- a/src/pcm/PcmConvert.cxx +++ b/src/pcm/PcmConvert.cxx @@ -30,8 +30,8 @@ pcm_convert_global_init(const ConfigData &config) } PcmConvert::PcmConvert(const AudioFormat _src_format, - const AudioFormat _dest_format) - :src_format(_src_format), dest_format(_dest_format) + const AudioFormat dest_format) + :src_format(_src_format) { assert(src_format.IsValid()); assert(dest_format.IsValid()); @@ -40,19 +40,19 @@ PcmConvert::PcmConvert(const AudioFormat _src_format, if (format.format == SampleFormat::DSD) format.format = SampleFormat::FLOAT; - enable_resampler = format.sample_rate != _dest_format.sample_rate; + enable_resampler = format.sample_rate != dest_format.sample_rate; if (enable_resampler) { - resampler.Open(format, _dest_format.sample_rate); + resampler.Open(format, dest_format.sample_rate); format.format = resampler.GetOutputSampleFormat(); - format.sample_rate = _dest_format.sample_rate; + format.sample_rate = dest_format.sample_rate; } - enable_format = format.format != _dest_format.format; + enable_format = format.format != dest_format.format; if (enable_format) { try { format_converter.Open(format.format, - _dest_format.format); + dest_format.format); } catch (...) { if (enable_resampler) resampler.Close(); @@ -60,13 +60,13 @@ PcmConvert::PcmConvert(const AudioFormat _src_format, } } - format.format = _dest_format.format; + format.format = dest_format.format; - enable_channels = format.channels != _dest_format.channels; + enable_channels = format.channels != dest_format.channels; if (enable_channels) { try { channels_converter.Open(format.format, format.channels, - _dest_format.channels); + dest_format.channels); } catch (...) { if (enable_format) format_converter.Close(); diff --git a/src/pcm/PcmConvert.hxx b/src/pcm/PcmConvert.hxx index e90accd97..7595db138 100644 --- a/src/pcm/PcmConvert.hxx +++ b/src/pcm/PcmConvert.hxx @@ -47,7 +47,7 @@ class PcmConvert { PcmFormatConverter format_converter; PcmChannelsConverter channels_converter; - const AudioFormat src_format, dest_format; + const AudioFormat src_format; bool enable_resampler, enable_format, enable_channels; |