- /* We must describe at least the number of channels in `field', even if they aren't
- * in the asset (I think)
- */
- int descriptors = max(_asset->channels(), field == MCASoundField::FIVE_POINT_ONE ? 6 : 8);
-
- auto const used = used_audio_channels();
-
- for (auto i = 0; i < descriptors; ++i) {
- auto dcp_channel = static_cast<dcp::Channel>(i);
- if (find(used.begin(), used.end(), dcp_channel) == used.end()) {
- continue;
- }
+ std::vector<dcp::Channel> dcp_channels = {
+ Channel::LEFT,
+ Channel::RIGHT,
+ Channel::CENTRE,
+ Channel::LFE,
+ Channel::LS,
+ Channel::RS
+ };
+
+ std::copy(_extra_active_channels.begin(), _extra_active_channels.end(), back_inserter(dcp_channels));
+ std::sort(dcp_channels.begin(), dcp_channels.end());
+ auto last = std::unique(dcp_channels.begin(), dcp_channels.end());
+ dcp_channels.erase(last, dcp_channels.end());
+
+ for (auto dcp_channel: dcp_channels) {