wavparse: support for partially unpositioned channels
Submitted by Ilya Konstantinov
Link to original bug (#745871)
Description
Here's a sample:
http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/WAVE/Samples/Microsoft/8_Channel_ID.wav
This is a file with 8 channels and the following speaker locations:
FL FR FC LF BL BR - -
(Only 6 allocated, the mask is 0x3f.)
As per spec:
"Should nChannels exceed the number of bits set in dwChannelMask, then the remaining channels are not assigned to any particular speaker location. An audio device would render the remaining channel data to output ports not in use." [1]
Since GstAudioChannelPositions requires channels to be either all positioned or all unpositioned, I think we should opt to offer caps of: channels:6, channel-mask:0x3f. (The remaining 2 channels can be only thrown away.)
Current GStreamer this warning out a few times, since wavparse produces 'channels:8, channel-mask:0x3f':
** (gst-launch-1.0:14286): WARNING **: Invalid channel positions
[1] https://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx