• Max Kellermann's avatar
    pcm/PcmChannels: silence surround channels when converting from stereo · 33716732
    Max Kellermann authored
    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.
    33716732
test_pcm_channels.cxx 3.42 KB