aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmExport.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-31 16:12:26 +0200
committerMax Kellermann <max@duempel.org>2014-08-31 16:12:26 +0200
commite5a28bfd8d07fe5ca5dee1bfb55ce414c8f7e9fc (patch)
tree304e2b5bfa829d95d2c756449f010bcc76762eac /src/pcm/PcmExport.cxx
parent6e04d66a354c02910ebd849f2233e52de8b6e3c4 (diff)
downloadmpd-e5a28bfd8d07fe5ca5dee1bfb55ce414c8f7e9fc.tar.gz
mpd-e5a28bfd8d07fe5ca5dee1bfb55ce414c8f7e9fc.tar.xz
mpd-e5a28bfd8d07fe5ca5dee1bfb55ce414c8f7e9fc.zip
output/alsa, pcm: rename "DSD over USB" to "DoP"
The standard has been renamed since the early draft that was implemented in MPD.
Diffstat (limited to '')
-rw-r--r--src/pcm/PcmExport.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/pcm/PcmExport.cxx b/src/pcm/PcmExport.cxx
index 5f567f3c6..ef099ba71 100644
--- a/src/pcm/PcmExport.cxx
+++ b/src/pcm/PcmExport.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "PcmExport.hxx"
-#include "PcmDsdUsb.hxx"
+#include "PcmDop.hxx"
#include "PcmPack.hxx"
#include "util/ByteReverse.hxx"
#include "util/ConstBuffer.hxx"
@@ -28,15 +28,15 @@
void
PcmExport::Open(SampleFormat sample_format, unsigned _channels,
- bool _dsd_usb, bool _shift8, bool _pack, bool _reverse_endian)
+ bool _dop, bool _shift8, bool _pack, bool _reverse_endian)
{
assert(audio_valid_sample_format(sample_format));
- assert(!_dsd_usb || audio_valid_channel_count(_channels));
+ assert(!_dop || audio_valid_channel_count(_channels));
channels = _channels;
- dsd_usb = _dsd_usb && sample_format == SampleFormat::DSD;
- if (dsd_usb)
- /* after the conversion to DSD-over-USB, the DSD
+ dop = _dop && sample_format == SampleFormat::DSD;
+ if (dop)
+ /* after the conversion to DoP, the DSD
samples are stuffed inside fake 24 bit samples */
sample_format = SampleFormat::S24_P32;
@@ -64,7 +64,7 @@ PcmExport::GetFrameSize(const AudioFormat &audio_format) const
/* packed 24 bit samples (3 bytes per sample) */
return audio_format.channels * 3;
- if (dsd_usb)
+ if (dop)
/* the DSD-over-USB draft says that DSD 1-bit samples
are enclosed within 24 bit samples, and MPD's
representation of 24 bit is padded to 32 bit (4
@@ -77,8 +77,8 @@ PcmExport::GetFrameSize(const AudioFormat &audio_format) const
ConstBuffer<void>
PcmExport::Export(ConstBuffer<void> data)
{
- if (dsd_usb)
- data = pcm_dsd_to_usb(dsd_buffer, channels,
+ if (dop)
+ data = pcm_dsd_to_dop(dop_buffer, channels,
ConstBuffer<uint8_t>::FromVoid(data))
.ToVoid();
@@ -125,8 +125,8 @@ PcmExport::CalcSourceSize(size_t size) const
/* 32 bit to 24 bit conversion (4 to 3 bytes) */
size = (size / 3) * 4;
- if (dsd_usb)
- /* DSD over USB doubles the transport size */
+ if (dop)
+ /* DoP doubles the transport size */
size /= 2;
return size;