diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-25 22:51:18 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-25 22:51:18 +0200 |
| commit | ba9fb85168d004d7643dc02f911fd173a136758b (patch) | |
| tree | 8beb9b26c9bf47dfe933c8e0ccaccb4e30a69286 /src/lib/audio_content.cc | |
| parent | d7cf091bdbbeae8187e887104d1135e93bcdf5da (diff) | |
Add NamedChannel and use it to hide the never-used channels
when mapping into a DCP.
Diffstat (limited to 'src/lib/audio_content.cc')
| -rw-r--r-- | src/lib/audio_content.cc | 11 |
1 files changed, 6 insertions, 5 deletions
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<const Film> film) const } /** @return User-visible names of each of our audio channels */ -vector<string> +vector<NamedChannel> AudioContent::channel_names () const { - vector<string> n; + vector<NamedChannel> 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; |
