pcm/PcmChannels: silence surround channels when converting from stereo

Previously, there was no special code to convert stereo to
multi-channel.  The generic solution for this was to convert to mono,
and then copy the result to all channels.  That's a pretty bad
solution, but at least something which always renders audio.  MPD does
something, instead of failing.

Now that MPD has proper support for multi-channel (by defining the
channel order), we can do better than that.  It is a (somewhat) common
case to play back stereo music on a DAC which can only do
multi-channel.  The best approach here is to copy the stereo channels
to front-left and front-right, and apply the "silence" pattern to all
other channels.
This commit is contained in:
Max Kellermann
2017-01-19 10:53:41 +01:00
parent 97ae594375
commit 33716732a1
3 changed files with 71 additions and 0 deletions

1
NEWS
View File

@@ -1,6 +1,7 @@
ver 0.20.3 (not yet released)
* protocol
- "playlistadd" creates new playlist if it does not exist, as documented
* silence surround channels when converting from stereo
* use shortcuts such as "dsd64" in log messages
ver 0.20.2 (2017/01/15)