roc-toolkit
roc-toolkit copied to clipboard
Dynamic channel order
Currently channel order can be only one of the predefined orders (ChannelOrder
enum).
In #693 we're going to support formats which support a lot of channel orders (like AIFF), and instead of explicitly supporting every possible channel order, it would be better to rely on libsndfile and just to query channel map from it in runtime.
To make it work, we can do the following:
- Add new ChanOrder_Custom to ChannelOrder enum.
- Add array of channel positions (ChannelPosition) to ChannelSet (of size ChanPos_Max elements).
- If ChanOrder_Custom is used, allow to get/set this array in ChannelSet.
- In ChannelMapperMatrix, when ChanOrder_Custom is used, use array from ChannelSet instead of ChannelOrderTable.
- Add tests for ChannelSet and ChannelMapper.