X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Ftime_calculation_test.cc;h=86b702f376ed41d02692377448a7a0b1472b4d78;hb=28c3c789cc903c5737902f4403b63765c9115089;hp=bf21e5476d47e807c756e07ef4adc53f77eb4ab0;hpb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;p=dcpomatic.git diff --git a/test/time_calculation_test.cc b/test/time_calculation_test.cc index bf21e5476..86b702f37 100644 --- a/test/time_calculation_test.cc +++ b/test/time_calculation_test.cc @@ -18,6 +18,11 @@ */ +/** @file test/time_calculation_test.cc + * @brief Test calculation of timings when frame rates change. + * @ingroup specific + */ + #include "lib/film.h" #include "lib/ffmpeg_content.h" #include "lib/video_content.h" @@ -25,12 +30,10 @@ #include "lib/audio_content.h" #include "test.h" #include -#include using std::string; using std::list; using boost::shared_ptr; -using boost::make_shared; static string const xml = "" "FFmpeg" @@ -84,7 +87,7 @@ static string const xml = "" "" "1" "und; 2 channels" - "2" + "1" "44100" "44100" "2" @@ -125,27 +128,27 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test) { shared_ptr film = new_test_film ("ffmpeg_time_calculation_test"); - shared_ptr doc = make_shared (); + shared_ptr doc (new cxml::Document); doc->read_string (xml); list notes; - shared_ptr content = boost::make_shared (film, doc, film->state_version(), notes); + shared_ptr content (new FFmpegContent (film, doc, film->state_version(), notes)); /* 25fps content, 25fps DCP */ film->set_video_frame_rate (25); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 25.0).get()); /* 25fps content, 24fps DCP; length should be increased */ film->set_video_frame_rate (24); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 24.0)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 24.0).get()); /* 25fps content, 30fps DCP; length should be decreased */ film->set_video_frame_rate (30); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 30.0)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 30.0).get()); /* 25fps content, 50fps DCP; length should be the same */ film->set_video_frame_rate (50); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 25.0).get()); /* 25fps content, 60fps DCP; length should be decreased */ film->set_video_frame_rate (60); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() * (50.0 / 60) / 25.0)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() * (50.0 / 60) / 25.0).get()); /* Make the content audio-only */ content->video.reset (); @@ -153,23 +156,23 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test) /* 24fps content, 24fps DCP */ film->set_video_frame_rate (24); content->set_video_frame_rate (24); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (1)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(1).get()); /* 25fps content, 25fps DCP */ film->set_video_frame_rate (25); content->set_video_frame_rate (25); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (1)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(1).get()); /* 25fps content, 24fps DCP; length should be increased */ film->set_video_frame_rate (24); - BOOST_CHECK_SMALL (abs (content->full_length().get() - DCPTime::from_seconds(25.0 / 24).get()), 2); + BOOST_CHECK_SMALL (labs (content->full_length().get() - DCPTime::from_seconds(25.0 / 24).get()), 2L); /* 25fps content, 30fps DCP; length should be decreased */ film->set_video_frame_rate (30); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (25.0 / 30)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(25.0 / 30).get()); /* 25fps content, 50fps DCP; length should be the same */ film->set_video_frame_rate (50); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (1)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(1).get()); /* 25fps content, 60fps DCP; length should be decreased */ film->set_video_frame_rate (60); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (50.0 / 60)); + BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(50.0 / 60).get()); } @@ -178,15 +181,15 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) { shared_ptr film = new_test_film ("player_time_calculation_test1"); - shared_ptr doc = make_shared (); + shared_ptr doc (new cxml::Document); doc->read_string (xml); list notes; - shared_ptr content = boost::make_shared (film, doc, film->state_version(), notes); + shared_ptr content (new FFmpegContent (film, doc, film->state_version(), notes)); film->set_sequence (false); film->add_content (content); - shared_ptr player = make_shared (film, film->playlist ()); + shared_ptr player (new Player (film, film->playlist ())); /* Position 0, no trim, content rate = DCP rate */ content->set_position (DCPTime ()); @@ -258,7 +261,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (9.75)), 168); /* Position 3s, 1.6s trim, content rate 24, DCP rate 25. Here the trim is in ContentTime, - so it's 1.6s at 24fps. + so it's 1.6s at 24fps. Note that trims are rounded to the nearest video frame, so + some of these results are not quite what you'd perhaps expect. */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.6)); @@ -271,7 +275,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.60)), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (3.00)), 38); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (4.60)), 78); - BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (9.75)), 207); + BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (9.75)), 206); /* Position 0, no trim, content rate 24, DCP rate 48 Now, for example, a DCPTime position of 3s means 3s at 48fps. Since we run the video @@ -383,15 +387,15 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) { shared_ptr film = new_test_film ("player_time_calculation_test2"); - shared_ptr doc = make_shared (); + shared_ptr doc (new cxml::Document); doc->read_string (xml); list notes; - shared_ptr content = boost::make_shared (film, doc, film->state_version(), notes); + shared_ptr content (new FFmpegContent (film, doc, film->state_version(), notes)); film->set_sequence (false); film->add_content (content); - shared_ptr player = make_shared (film, film->playlist ()); + shared_ptr player (new Player (film, film->playlist ())); /* Position 0, no trim, content rate = DCP rate */ content->set_position (DCPTime ()); @@ -401,9 +405,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); shared_ptr piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime ()); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 12), DCPTime::from_seconds (0.5)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72), DCPTime::from_seconds (3.0)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0).get(), 0); + BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 12).get(), DCPTime::from_seconds(0.5).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72).get(), DCPTime::from_seconds(3.0).get()); /* Position 3s, no trim, content rate = DCP rate */ content->set_position (DCPTime::from_seconds (3)); @@ -413,9 +417,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (3.00)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 36), DCPTime::from_seconds (4.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 162), DCPTime::from_seconds (9.75)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(4.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 162).get(), DCPTime::from_seconds(9.75).get()); /* Position 3s, 1.5s trim, content rate = DCP rate */ content->set_position (DCPTime::from_seconds (3)); @@ -425,10 +429,10 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (1.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 36), DCPTime::from_seconds (3.00)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72), DCPTime::from_seconds (4.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 198), DCPTime::from_seconds (9.75)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(1.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(3.00).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(4.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 198).get(), DCPTime::from_seconds(9.75).get()); /* Position 0, no trim, content rate 24, DCP rate 25. Now, for example, a DCPTime position of 3s means 3s at 25fps. Since we run the video @@ -441,9 +445,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime ()); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 15), DCPTime::from_seconds (0.6)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 75), DCPTime::from_seconds (3.0)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 0); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 15).get(), DCPTime::from_seconds(0.6).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 75).get(), DCPTime::from_seconds(3.0).get()); /* Position 3s, no trim, content rate 24, DCP rate 25 */ content->set_position (DCPTime::from_seconds (3)); @@ -453,9 +457,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (3.00)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 40), DCPTime::from_seconds (4.60)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 169), DCPTime::from_seconds (9.76)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 40).get(), DCPTime::from_seconds(4.60).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 169).get(), DCPTime::from_seconds(9.76).get()); /* Position 3s, 1.6s trim, content rate 24, DCP rate 25, so the 1.6s trim is at 24fps */ content->set_position (DCPTime::from_seconds (3)); @@ -465,10 +469,10 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (1.464)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 40), DCPTime::from_seconds (3.064)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 80), DCPTime::from_seconds (4.664)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 209), DCPTime::from_seconds (9.824)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 142080); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 40).get(), 295680); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 80).get(), 449280); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 209).get(), 944640); /* Position 0, no trim, content rate 24, DCP rate 48 Now, for example, a DCPTime position of 3s means 3s at 48fps. Since we run the video @@ -483,9 +487,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime ()); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 12), DCPTime::from_seconds (0.5)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72), DCPTime::from_seconds (3.0)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 0); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 12).get(), DCPTime::from_seconds(0.5).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(3.0).get()); /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); @@ -495,9 +499,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (3.00)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 36), DCPTime::from_seconds (4.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 162), DCPTime::from_seconds (9.75)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(4.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 162).get(), DCPTime::from_seconds(9.75).get()); /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); @@ -507,10 +511,10 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (1.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 36), DCPTime::from_seconds (3.00)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72), DCPTime::from_seconds (4.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 198), DCPTime::from_seconds (9.75)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(1.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(3.00).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(4.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 198).get(), DCPTime::from_seconds(9.75).get()); /* Position 0, no trim, content rate 48, DCP rate 24 Now, for example, a DCPTime position of 3s means 3s at 24fps. Since we run the video @@ -524,9 +528,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime ()); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 24), DCPTime::from_seconds (0.5)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 144), DCPTime::from_seconds (3.0)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 0); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 24).get(), DCPTime::from_seconds(0.5).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 144).get(), DCPTime::from_seconds(3.0).get()); /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); @@ -536,9 +540,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (3.00)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72), DCPTime::from_seconds (4.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 324), DCPTime::from_seconds (9.75)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(4.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 324).get(), DCPTime::from_seconds(9.75).get()); /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); @@ -548,10 +552,10 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); piece = player->_pieces.front (); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0), DCPTime::from_seconds (1.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72), DCPTime::from_seconds (3.00)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 144), DCPTime::from_seconds (4.50)); - BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 396), DCPTime::from_seconds (9.75)); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(1.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(3.00).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 144).get(), DCPTime::from_seconds(4.50).get()); + BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 396).get(), DCPTime::from_seconds(9.75).get()); } /** Test Player::dcp_to_content_audio */ @@ -559,16 +563,16 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) { shared_ptr film = new_test_film ("player_time_calculation_test3"); - shared_ptr doc = make_shared (); + shared_ptr doc (new cxml::Document); doc->read_string (xml); list notes; - shared_ptr content = boost::make_shared (film, doc, film->state_version(), notes); + shared_ptr content (new FFmpegContent (film, doc, film->state_version(), notes)); AudioStreamPtr stream = content->audio->streams().front(); film->set_sequence (false); film->add_content (content); - shared_ptr player = make_shared (film, film->playlist ()); + shared_ptr player (new Player (film, film->playlist ())); /* Position 0, no trim, video/audio content rate = video/audio DCP rate */ content->set_position (DCPTime ()); @@ -654,9 +658,9 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.60)), 0); - BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (3.00)), 73728); - BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (4.60)), 150528); - BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 397728); + BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (3.00)), 72960); + BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (4.60)), 149760); + BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 396960); /* Position 0, no trim, content rate 24, DCP rate 48, both audio rates still 48k. Now, for example, a DCPTime position of 3s means 3s at 48fps. Since we run the video