From b7c82dec9d396a46ef3291eeaa956cb385081d81 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 16 Oct 2023 23:12:33 +0200 Subject: Cleanup: add some comments. --- src/sound_asset_writer.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/sound_asset_writer.cc b/src/sound_asset_writer.cc index a7be0859..49170990 100644 --- a/src/sound_asset_writer.cc +++ b/src/sound_asset_writer.cc @@ -190,6 +190,9 @@ LIBDCP_ENABLE_WARNINGS _state->mxf_writer.OP1aHeader().AddChildObject(soundfield); essence_descriptor->SubDescriptors.push_back(soundfield->InstanceUID); + /* We always make a descriptor for these channels if they are present in the asset; + * there's no way for the caller to tell us whether they are active or not. + */ std::vector dcp_channels = { Channel::LEFT, Channel::RIGHT, @@ -199,7 +202,12 @@ LIBDCP_ENABLE_WARNINGS Channel::RS }; + /* We add descriptors for some extra channels that the caller gave us (we made sure earlier + * that nothing "bad" is in this list). + */ std::copy(_extra_active_channels.begin(), _extra_active_channels.end(), back_inserter(dcp_channels)); + + /* Remove duplicates */ 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()); -- cgit v1.2.3