aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmExport.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-10-27 00:22:22 +0100
committerMax Kellermann <max@duempel.org>2015-10-27 11:44:23 +0100
commit15e432204e62dd5a1c873af13a679195b9645b0c (patch)
treea00687f4ac08b273a9416c36681749c42ed9dcbe /src/pcm/PcmExport.hxx
parent4b1630e1ec1fe5cbecc013a3e1487d9f43fcdd2f (diff)
downloadmpd-15e432204e62dd5a1c873af13a679195b9645b0c.tar.gz
mpd-15e432204e62dd5a1c873af13a679195b9645b0c.tar.xz
mpd-15e432204e62dd5a1c873af13a679195b9645b0c.zip
pcm/Order: new library to convert from FLAC to ALSA channel order
This new library is integrated in the PcmExport class and (if enabled) converts MPD's channel order (= FLAC channel order) to ALSA channel order. This fixes: http://bugs.musicpd.org/view.php?id=3147 and http://bugs.musicpd.org/view.php?id=3255
Diffstat (limited to 'src/pcm/PcmExport.hxx')
-rw-r--r--src/pcm/PcmExport.hxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pcm/PcmExport.hxx b/src/pcm/PcmExport.hxx
index 7265ca07d..aafa1cea0 100644
--- a/src/pcm/PcmExport.hxx
+++ b/src/pcm/PcmExport.hxx
@@ -34,6 +34,13 @@ template<typename T> struct ConstBuffer;
*/
struct PcmExport {
/**
+ * This buffer is used to reorder channels.
+ *
+ * @see #alsa_channel_order
+ */
+ PcmBuffer order_buffer;
+
+ /**
* The buffer is used to convert DSD samples to the
* DoP format.
*
@@ -61,6 +68,16 @@ struct PcmExport {
uint8_t channels;
/**
+ * Convert the given buffer from FLAC channel order to ALSA
+ * channel order using ToAlsaChannelOrder()?
+ *
+ * If this value is SampleFormat::UNDEFINED, then no channel
+ * reordering is applied, otherwise this is the input sample
+ * format.
+ */
+ SampleFormat alsa_channel_order;
+
+ /**
* Convert DSD to DSD-over-PCM (DoP)? Input format must be
* SampleFormat::DSD and output format must be
* SampleFormat::S24_P32.
@@ -96,6 +113,7 @@ struct PcmExport {
* @param channels the number of channels; ignored unless dop is set
*/
void Open(SampleFormat sample_format, unsigned channels,
+ bool _alsa_channel_order,
bool dop, bool shift8, bool pack, bool reverse_endian);
/**