X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Faudio_decoder_test.cc;h=273d04344d79b23f7ac449747a8480629cda6e6f;hb=2268783ea44e97e118d6fd164618fcf736563e29;hp=945773d1203fc24cda5b45432da94df5073a7d88;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc index 945773d12..273d04344 100644 --- a/test/audio_decoder_test.cc +++ b/test/audio_decoder_test.cc @@ -26,6 +26,9 @@ #include "lib/content.h" #include "lib/audio_decoder.h" #include "lib/audio_content.h" +#include "lib/content_factory.h" +#include "lib/dcp_content_type.h" +#include "lib/ratio.h" #include "lib/film.h" #include #include @@ -66,7 +69,7 @@ public: : _test_audio_content (content) , _position (0) { - audio.reset (new AudioDecoder (this, content->audio, false, log)); + audio.reset (new AudioDecoder (this, content->audio, log)); } bool pass (PassReason, bool) @@ -149,3 +152,18 @@ BOOST_AUTO_TEST_CASE (audio_decoder_get_audio_test) } } } + +BOOST_AUTO_TEST_CASE (audio_decoder_test) +{ + shared_ptr film = new_test_film ("analyse_audio_test"); + film->set_container (Ratio::from_id ("185")); + film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); + film->set_name ("frobozz"); + shared_ptr content = content_factory (film, private_data / "20 The Wedding Convoy Song.m4a"); + film->examine_and_add_content (content); + wait_for_jobs (); + + content->set_trim_start (ContentTime::from_seconds (60)); + film->make_dcp (); + BOOST_CHECK (!wait_for_jobs ()); +}