From 387304bc9147933b68eda2b38ba8cac0d250e87e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 27 May 2015 02:09:22 +0100 Subject: Untested use of Frame for video/audio content lengths. --- test/audio_decoder_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/audio_decoder_test.cc') 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 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 { -- cgit v1.2.3