diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-10-15 22:33:46 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-10-15 22:42:48 +0200 |
| commit | 4d0356840c2f400b0376230a3d07f57897275f99 (patch) | |
| tree | bb8468a24a2d13383085224c9d383b7664bb4db8 /test | |
| parent | a3c663012ae1134bef0c36304d71ab319114cfcb (diff) | |
Always block waiting for audio when exporting.
Otherwise if there is non available we'll insert silence and potentially
push the audio out of sync (late). May help with #2098.
Diffstat (limited to 'test')
| -rw-r--r-- | test/butler_test.cc | 2 | ||||
| -rw-r--r-- | test/dcp_playback_test.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/butler_test.cc b/test/butler_test.cc index e57779334..3d524a3b2 100644 --- a/test/butler_test.cc +++ b/test/butler_test.cc @@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE (butler_test1) /* XXX: check the frame contents */ float buffer[256 * 6]; - BOOST_REQUIRE (butler.get_audio(buffer, 256) == DCPTime()); + BOOST_REQUIRE (butler.get_audio(Butler::Behaviour::BLOCKING, buffer, 256) == DCPTime()); for (int i = 0; i < 256; ++i) { BOOST_REQUIRE_EQUAL (buffer[i * 6 + 0], 0); BOOST_REQUIRE_EQUAL (buffer[i * 6 + 1], 0); diff --git a/test/dcp_playback_test.cc b/test/dcp_playback_test.cc index 892825753..5117be9ed 100644 --- a/test/dcp_playback_test.cc +++ b/test/dcp_playback_test.cc @@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (dcp_playback_test) break; } /* assuming DCP is 24fps/48kHz */ - butler->get_audio (audio_buffer.data(), 2000); + butler->get_audio (Butler::Behaviour::BLOCKING, audio_buffer.data(), 2000); p.first->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, true); } } |
