summaryrefslogtreecommitdiff
path: root/test/audio_decoder_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-27 02:09:22 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-27 02:09:22 +0100
commit387304bc9147933b68eda2b38ba8cac0d250e87e (patch)
tree0697a08182c94193a3424d44d5f7af4231f0ade3 /test/audio_decoder_test.cc
parentfd2b1840496fa121727b7e835843c8beeaebd5eb (diff)
Untested use of Frame for video/audio content lengths.
Diffstat (limited to 'test/audio_decoder_test.cc')
-rw-r--r--test/audio_decoder_test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc
index e31689d3f..7b7fa637b 100644
--- a/test/audio_decoder_test.cc
+++ b/test/audio_decoder_test.cc
@@ -44,7 +44,7 @@ public:
{
Frame const N = min (
Frame (2000),
- _audio_content->audio_length().frames (_audio_content->resampled_audio_frame_rate ()) - _position
+ _audio_content->audio_length() - _position
);
shared_ptr<AudioBuffers> buffers (new AudioBuffers (_audio_content->audio_channels(), N));
@@ -87,15 +87,15 @@ public:
}
DCPTime full_length () const {
- return DCPTime (audio_length().get ());
+ return DCPTime::from_seconds (float (audio_length()) / audio_frame_rate ());
}
int audio_channels () const {
return 2;
}
- ContentTime audio_length () const {
- return ContentTime::from_seconds (61.2942);
+ Frame audio_length () const {
+ return rint (61.2942 * audio_frame_rate ());
}
int audio_frame_rate () const {