summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic_create.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-11-28 19:36:06 +0100
committerCarl Hetherington <cth@carlh.net>2021-11-29 01:08:53 +0100
commit87133162b564d29592eefbbddc02399e880504b6 (patch)
tree55f8830149e1dcf43401997faf5bada1811a9b61 /src/tools/dcpomatic_create.cc
parent7b7455685ef18e7b84909f4b0a81a985c60940da (diff)
Add --channel option to dcpomatic_create.
Diffstat (limited to 'src/tools/dcpomatic_create.cc')
-rw-r--r--src/tools/dcpomatic_create.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc
index 73bcfd882..1c11de3e3 100644
--- a/src/tools/dcpomatic_create.cc
+++ b/src/tools/dcpomatic_create.cc
@@ -137,6 +137,15 @@ main (int argc, char* argv[])
if (j->video) {
j->video->set_frame_type (i.frame_type);
}
+ if (j->audio && i.channel) {
+ for (auto stream: j->audio->streams()) {
+ AudioMapping mapping(stream->channels(), film->audio_channels());
+ for (int channel = 0; channel < stream->channels(); ++channel) {
+ mapping.set(channel, *i.channel, 1.0f);
+ }
+ stream->set_mapping (mapping);
+ }
+ }
}
}