diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-10-18 17:48:13 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-10-18 17:48:13 +0200 |
| commit | 6dc179f7d08477ecc7bac1257b47dda048a1b878 (patch) | |
| tree | e04a594ce45cd2388cfc9d92f4cbe792847b7a53 /src/lib/util.cc | |
| parent | 2c096eb293cf84044e3b2ea31ab0831921ec1848 (diff) | |
ISDCF name fixes with > 6 channels and HI/VI (#1633).
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 2dedc32c1..cd2d5a368 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -779,7 +779,7 @@ careful_string_filter (string s) /** @param mapped List of mapped audio channels from a Film. * @param channels Total number of channels in the Film. - * @return First: number of non-LFE channels, second: number of LFE channels. + * @return First: number of non-LFE soundtrack channels (L/R/C/Ls/Rs/Lc/Rc/Bsl/Bsr), second: number of LFE channels. */ pair<int, int> audio_channel_types (list<int> mapped, int channels) @@ -793,10 +793,24 @@ audio_channel_types (list<int> mapped, int channels) continue; } - if (static_cast<dcp::Channel> (i) == dcp::LFE) { + switch (static_cast<dcp::Channel>(i)) { + case dcp::LFE: ++lfe; - } else { + break; + case dcp::LEFT: + case dcp::RIGHT: + case dcp::CENTRE: + case dcp::LS: + case dcp::RS: + case dcp::LC: + case dcp::RC: + case dcp::BSL: + case dcp::BSR: ++non_lfe; + break; + case dcp::HI: + case dcp::VI: + break; } } |
