pcm/PcmConvert: remove unused attribute "dest_format"
This commit is contained in:
parent
e78d825059
commit
6addc9d6e0
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue