roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Dynamic channel order

Open gavv opened this issue 1 year ago • 0 comments

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.

gavv avatar Feb 09 '24 11:02 gavv