pcm/Export: halve the sample rate for DoP
Move this sample rate fixup from the ALSA output plugin to PcmExport, where it belongs.
This commit is contained in:
@@ -106,6 +106,11 @@ PcmExport::Params::CalcOutputSampleRate(unsigned sample_rate) const
|
||||
/* DSD_U32 combines four 8-bit "samples" in one 32-bit
|
||||
"sample" */
|
||||
sample_rate /= 4;
|
||||
|
||||
if (dop)
|
||||
/* DoP packs two 8-bit "samples" in one 24-bit
|
||||
"sample" */
|
||||
sample_rate /= 2;
|
||||
#endif
|
||||
|
||||
return sample_rate;
|
||||
@@ -117,6 +122,9 @@ PcmExport::Params::CalcInputSampleRate(unsigned sample_rate) const
|
||||
#ifdef ENABLE_DSD
|
||||
if (dsd_u32)
|
||||
sample_rate *= 4;
|
||||
|
||||
if (dop)
|
||||
sample_rate *= 2;
|
||||
#endif
|
||||
|
||||
return sample_rate;
|
||||
|
Reference in New Issue
Block a user