diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-06-01 14:23:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-06-01 14:23:56 +0100 |
| commit | 3c86d70cf46ca11212ae2e2f4d711db0f478c2f5 (patch) | |
| tree | 5b160eca7b1569eeecb8203b39bb98b97e1fa617 /src/lib/player.cc | |
| parent | 769ce034cbb2f95f01dba3d22f7bd554ecb14f3e (diff) | |
Re-add missing audio mapping in butler for preview.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index de221fef3..2e47da5bf 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -718,24 +718,7 @@ Player::audio_transform (shared_ptr<AudioContent> content, AudioStreamPtr stream /* Remap */ - shared_ptr<AudioBuffers> dcp_mapped (new AudioBuffers (_film->audio_channels(), content_audio.audio->frames())); - dcp_mapped->make_silent (); - - AudioMapping map = stream->mapping (); - for (int i = 0; i < map.input_channels(); ++i) { - for (int j = 0; j < dcp_mapped->channels(); ++j) { - if (map.get (i, static_cast<dcp::Channel> (j)) > 0) { - dcp_mapped->accumulate_channel ( - content_audio.audio.get(), - i, - static_cast<dcp::Channel> (j), - map.get (i, static_cast<dcp::Channel> (j)) - ); - } - } - } - - content_audio.audio = dcp_mapped; + content_audio.audio = remap (content_audio.audio, _film->audio_channels(), stream->mapping()); /* Process */ |
