From ba9fb85168d004d7643dc02f911fd173a136758b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 25 Sep 2020 22:51:18 +0200 Subject: Add NamedChannel and use it to hide the never-used channels when mapping into a DCP. --- src/lib/audio_content.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib/audio_content.cc') diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc index 014221f2e..22521c9e9 100644 --- a/src/lib/audio_content.cc +++ b/src/lib/audio_content.cc @@ -265,17 +265,18 @@ AudioContent::processing_description (shared_ptr film) const } /** @return User-visible names of each of our audio channels */ -vector +vector AudioContent::channel_names () const { - vector n; + vector n; - int t = 1; + int index = 0; + int stream = 1; BOOST_FOREACH (AudioStreamPtr i, streams ()) { for (int j = 0; j < i->channels(); ++j) { - n.push_back (String::compose ("%1:%2", t, j + 1)); + n.push_back (NamedChannel(String::compose ("%1:%2", stream, j + 1), index++)); } - ++t; + ++stream; } return n; -- cgit v1.2.3