summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-02-12 17:28:33 +0100
committerCarl Hetherington <cth@carlh.net>2026-02-25 00:46:32 +0100
commit6800ed98731522b5148a7d31d19d8ba19796e7c5 (patch)
tree708916de9b86df408925b97800c302b3fc3cc52d
parent366616d98e654638e49d7babc5fc04d85689c0af (diff)
Add FSKSync it to the MainSoundConfiguration.
-rw-r--r--src/lib/writer.cc7
-rw-r--r--test/atmos_test.cc17
2 files changed, 21 insertions, 3 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index b52b39649..88128bb17 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -680,6 +680,13 @@ Writer::finish()
}
}
+ if (film()->contains_atmos_content()) {
+ if (msc.channels() < 14) {
+ msc.set_channels(14);
+ }
+ msc.set_mapping(13, dcp::Channel::SYNC_SIGNAL);
+ }
+
cpl->set_main_sound_configuration(msc);
cpl->set_main_sound_sample_rate(film()->audio_frame_rate());
cpl->set_main_picture_stored_area(film()->frame_size());
diff --git a/test/atmos_test.cc b/test/atmos_test.cc
index 63da157b5..885541a5c 100644
--- a/test/atmos_test.cc
+++ b/test/atmos_test.cc
@@ -45,17 +45,29 @@ BOOST_AUTO_TEST_CASE(atmos_passthrough_test)
{
Cleanup cl;
+ auto atmos = content_factory(TestPaths::private_data() / "atmos_asset.mxf")[0];
+ auto picture = content_factory("test/data/flat_red.png")[0];
+
auto film = new_test_film(
"atmos_passthrough_test",
- content_factory(TestPaths::private_data() / "atmos_asset.mxf"),
+ { atmos, picture },
&cl
);
- make_and_verify_dcp(film, {dcp::VerificationNote::Code::MISSING_CPL_METADATA});
+ make_and_verify_dcp(film);
auto ref = TestPaths::private_data() / "atmos_asset.mxf";
BOOST_REQUIRE(mxf_atmos_files_same(ref, dcp_file(film, "atmos"), true));
+ dcp::DCP dcp(film->dir(film->dcp_name()));
+ dcp.read();
+ BOOST_REQUIRE_EQUAL(dcp.cpls().size(), 1U);
+ auto cpl = dcp.cpls()[0];
+ auto msc = cpl->main_sound_configuration();
+ BOOST_REQUIRE(msc);
+ BOOST_REQUIRE(msc->channels() > 13);
+ BOOST_CHECK(msc->mapping(13).get_value_or(dcp::Channel::LEFT) == dcp::Channel::SYNC_SIGNAL);
+
cl.run();
}
@@ -180,4 +192,3 @@ BOOST_AUTO_TEST_CASE(atmos_multi_reel_test)
BOOST_CHECK(reels[i]->atmos());
}
}
-