X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Faudio_decoder_test.cc;h=44d0d60f416e664fa76faf9495b9e8601b4c4f1c;hb=526fd6de4c80a7ac9614a1cb0209efff7b171cd5;hp=6816c1fbb45532dc184ccd6f2afa5fb83b11cdb9;hpb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;p=dcpomatic.git diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc index 6816c1fbb..44d0d60f4 100644 --- a/test/audio_decoder_test.cc +++ b/test/audio_decoder_test.cc @@ -26,6 +26,7 @@ #include "test.h" #include "lib/audio_decoder.h" #include "lib/single_stream_audio_content.h" +#include using std::string; using std::cout; @@ -51,7 +52,7 @@ public: } Frame audio_length () const { - return rint (61.2942 * audio_stream()->frame_rate ()); + return llrint (61.2942 * audio_stream()->frame_rate ()); } }; @@ -59,7 +60,7 @@ class TestAudioDecoder : public AudioDecoder { public: TestAudioDecoder (shared_ptr content) - : AudioDecoder (content) + : AudioDecoder (content, false) , _test_audio_content (content) , _position (0) {} @@ -87,7 +88,7 @@ public: void seek (ContentTime t, bool accurate) { AudioDecoder::seek (t, accurate); - _position = t.frames (_test_audio_content->resampled_audio_frame_rate ()); + _position = t.frames_round (_test_audio_content->resampled_audio_frame_rate ()); } private: