diff options
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 a17ac54f5..765fc3bf5 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -777,7 +777,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) @@ -791,10 +791,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; } } |
