summaryrefslogtreecommitdiff
path: root/test/frame_rate_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-14 01:01:28 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit65b331d32c383f3a9049f29bf03ab3fe3193b31a (patch)
tree3b27e0ca60742021094cee889a1c8d1ef4d75f8c /test/frame_rate_test.cc
parent6dd3777a0074f6f97c7f7286621006a1c14376e8 (diff)
Split audio; builds.
Diffstat (limited to 'test/frame_rate_test.cc')
-rw-r--r--test/frame_rate_test.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/frame_rate_test.cc b/test/frame_rate_test.cc
index 78d092b94..4d865de7b 100644
--- a/test/frame_rate_test.cc
+++ b/test/frame_rate_test.cc
@@ -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));
}