diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-10 14:29:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 504c63b3d62038bc486ca8a09e77fbb403907edd (patch) | |
| tree | d9118c185110dd9eb103ed033700d4b3f486785d /test/audio_decoder_test.cc | |
| parent | 9423e02c37daba7f9e406929a1cfc1bb10fb4b62 (diff) | |
Basics of splitting up Decoder tree like Content.
Diffstat (limited to 'test/audio_decoder_test.cc')
| -rw-r--r-- | test/audio_decoder_test.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc index 21480a5c3..5eabc4074 100644 --- a/test/audio_decoder_test.cc +++ b/test/audio_decoder_test.cc @@ -58,14 +58,15 @@ public: } }; -class TestAudioDecoder : public AudioDecoder +class TestAudioDecoder : public Decoder { public: TestAudioDecoder (shared_ptr<TestAudioContent> content, shared_ptr<Log> log) - : AudioDecoder (content->audio, false, log) - , _test_audio_content (content) + : _test_audio_content (content) , _position (0) - {} + { + audio.reset (new AudioDecoder (this, content->audio, false, log)); + } bool pass (PassReason, bool) { @@ -81,7 +82,7 @@ public: } } - audio (_test_audio_content->audio->stream(), buffers, ContentTime::from_frames (_position, 48000)); + audio->audio (_test_audio_content->audio->stream(), buffers, ContentTime::from_frames (_position, 48000)); _position += N; return N < 2000; @@ -89,7 +90,7 @@ public: void seek (ContentTime t, bool accurate) { - AudioDecoder::seek (t, accurate); + audio->seek (t, accurate); _position = t.frames_round (_test_audio_content->audio->resampled_frame_rate ()); } @@ -105,7 +106,7 @@ static ContentAudio get (Frame from, Frame length) { decoder->seek (ContentTime::from_frames (from, content->audio->resampled_frame_rate ()), true); - ContentAudio ca = decoder->get_audio (content->audio->stream(), from, length, true); + ContentAudio ca = decoder->audio->get_audio (content->audio->stream(), from, length, true); BOOST_CHECK_EQUAL (ca.frame, from); return ca; } |
