- if (audio_processor ()) {
- /* Processors are mapped 1:1 to DCP outputs so we can guess the number of LFE/
- non-LFE from the channel counts.
- */
- non_lfe = audio_processor()->out_channels ();
- if (non_lfe >= 4) {
- --non_lfe;
- ++lfe;
- }
- } else {
- list<int> mapped;
- BOOST_FOREACH (shared_ptr<Content> i, content ()) {
- shared_ptr<const AudioContent> ac = dynamic_pointer_cast<const AudioContent> (i);
- if (ac) {
- list<int> c = ac->audio_mapping().mapped_output_channels ();
- copy (c.begin(), c.end(), back_inserter (mapped));
- }
+ BOOST_FOREACH (int i, mapped_audio_channels ()) {
+ if (i >= audio_channels()) {
+ /* This channel is mapped but is not included in the DCP */
+ continue;