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
This commit is contained in:
Max Kellermann
2015-10-27 00:22:22 +01:00
parent 4b1630e1ec
commit 15e432204e
10 changed files with 269 additions and 8 deletions

View File

@@ -711,7 +711,7 @@ AlsaOutput::SetupOrDop(AudioFormat &audio_format, Error &error)
pcm_export->Open(audio_format.format,
audio_format.channels,
dop2, shift8, packed, reverse_endian);
true, dop2, shift8, packed, reverse_endian);
return true;
}

View File

@@ -537,7 +537,7 @@ oss_probe_sample_format(int fd, SampleFormat sample_format,
*oss_format_r = oss_format;
#ifdef AFMT_S24_PACKED
pcm_export.Open(sample_format, 0, false, false,
pcm_export.Open(sample_format, 0, true, false, false,
oss_format == AFMT_S24_PACKED,
oss_format == AFMT_S24_PACKED &&
!IsLittleEndian());