diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-08-02 18:23:36 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-08-02 18:23:36 +0200 |
| commit | 7d9e108ba3629b2e9120bc1da3354935c41aca37 (patch) | |
| tree | c8ffdb2bca75d62bfe9fa2262e9fc4cd19c45027 /test/sound_frame_test.cc | |
| parent | 6f98afd8021f9475bbd342bdcb39162b3167fa9e (diff) | |
WIP: more hacks.shared-ptr
Diffstat (limited to 'test/sound_frame_test.cc')
| -rw-r--r-- | test/sound_frame_test.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sound_frame_test.cc b/test/sound_frame_test.cc index a8060bd4..60a08b33 100644 --- a/test/sound_frame_test.cc +++ b/test/sound_frame_test.cc @@ -50,9 +50,9 @@ BOOST_AUTO_TEST_CASE (sound_frame_test) private_test / "TONEPLATES-SMPTE-PLAINTEXT_TST_F_XX-XX_ITL-TD_51-XX_2K_WOE_20111001_WOE_OV/pcm_95734608-5d47-4d3f-bf5f-9e9186b66afa_.mxf" ); - shared_ptr<const dcp::SoundFrame> frame = asset.start_read()->get_frame(42); + auto frame = asset.start_read()->get_frame(42); - BOOST_REQUIRE_EQUAL (frame->size(), channels * frame_length * 3); + BOOST_REQUIRE_EQUAL(frame.size(), channels * frame_length * 3); boost::filesystem::path ref_file = private_test / "data" / "frame.wav"; SF_INFO info; @@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE (sound_frame_test) BOOST_REQUIRE_EQUAL (read, frame_length); /* Check raw data is as we expect */ - uint8_t const * p = frame->data (); + uint8_t const * p = frame.data(); for (int i = 0; i < (frame_length * channels); ++i) { int x = ref_data[i] >> 8; if (x < 0) { @@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE (sound_frame_test) int* ref = ref_data; for (int sample = 0; sample < frame_length; ++sample) { for (int channel = 0; channel < channels; ++channel) { - BOOST_REQUIRE_EQUAL ((*ref++) >> 8, frame->get(channel, sample)); + BOOST_REQUIRE_EQUAL((*ref++) >> 8, frame.get(channel, sample)); } } } |
