Split audio; builds.
[dcpomatic.git] / test / frame_rate_test.cc
index 78d092b94179b14fd07dda0bdb7c6bfe621ee9e0..4d865de7bd18d28c0fb2af332a64be2a32dd2fdf 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@
 #include "lib/ffmpeg_audio_stream.h"
 #include "lib/frame_rate_change.h"
 #include "lib/video_content.h"
+#include "lib/audio_content.h"
 #include "test.h"
 
 using boost::shared_ptr;
@@ -265,34 +266,34 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
        content->video->_video_frame_rate = 24;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 48000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 48000);
 
        stream->_frame_rate = 44100;
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 48000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 48000);
 
        stream->_frame_rate = 80000;
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 96000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 96000);
 
        content->video->_video_frame_rate = 23.976;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 47952);
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 47952);
 
        content->video->_video_frame_rate = 29.97;
        film->set_video_frame_rate (30);
        BOOST_CHECK_EQUAL (film->video_frame_rate (), 30);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 47952);
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 47952);
 
        content->video->_video_frame_rate = 25;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 50000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 50000);
 
        content->video->_video_frame_rate = 25;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 50000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 50000);
 
        /* Check some out-there conversions (not the best) */
 
@@ -302,5 +303,5 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
        /* The FrameRateChange within resampled_audio_frame_rate should choose to double-up
           the 14.99 fps video to 30 and then run it slow at 25.
        */
-       BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), lrint (48000 * 2 * 14.99 / 25));
+       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), lrint (48000 * 2 * 14.99 / 25));
 }