diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-02 18:17:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-02 18:17:35 +0100 |
| commit | 40b3ced17b7fff8badfaa8ec2201a8186cdc7dc2 (patch) | |
| tree | 38c13732a1d05e7b4c925e651caa25aa6f6edd4c /test/audio_decoder_test.cc | |
| parent | 3967bd6a07b436a6b2eb8d0f8f634fdc11689c75 (diff) | |
Rename AudioContent frame_rate methods and move resampled_audio_frame_rate into AudioContent.
Diffstat (limited to 'test/audio_decoder_test.cc')
| -rw-r--r-- | test/audio_decoder_test.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc index 46f9d5ac6..a14e2f9be 100644 --- a/test/audio_decoder_test.cc +++ b/test/audio_decoder_test.cc @@ -44,7 +44,7 @@ public: { AudioFrame const N = min ( AudioFrame (2000), - _audio_content->audio_length().frames (_audio_content->output_audio_frame_rate ()) - _position + _audio_content->audio_length().frames (_audio_content->resampled_audio_frame_rate ()) - _position ); shared_ptr<AudioBuffers> buffers (new AudioBuffers (_audio_content->audio_channels(), N)); @@ -54,7 +54,7 @@ public: } } - audio (buffers, ContentTime::from_frames (_position, _audio_content->output_audio_frame_rate ())); + audio (buffers, ContentTime::from_frames (_position, _audio_content->resampled_audio_frame_rate ())); _position += N; return N < 2000; @@ -63,7 +63,7 @@ public: void seek (ContentTime t, bool accurate) { AudioDecoder::seek (t, accurate); - _position = t.frames (_audio_content->output_audio_frame_rate ()); + _position = t.frames (_audio_content->resampled_audio_frame_rate ()); } private: @@ -98,11 +98,7 @@ public: return ContentTime::from_seconds (61.2942); } - int content_audio_frame_rate () const { - return 48000; - } - - int output_audio_frame_rate () const { + int audio_frame_rate () const { return 48000; } @@ -119,7 +115,7 @@ shared_ptr<TestAudioDecoder> decoder; static shared_ptr<ContentAudio> get (AudioFrame from, AudioFrame length) { - decoder->seek (ContentTime::from_frames (from, content->output_audio_frame_rate ()), true); + decoder->seek (ContentTime::from_frames (from, content->resampled_audio_frame_rate ()), true); shared_ptr<ContentAudio> ca = decoder->get_audio (from, length, true); BOOST_CHECK_EQUAL (ca->frame, from); return ca; @@ -152,8 +148,8 @@ BOOST_AUTO_TEST_CASE (audio_decoder_get_audio_test) /* Read off the end */ - AudioFrame const from = content->output_audio_frame_rate() * 61; - AudioFrame const length = content->output_audio_frame_rate() * 4; + AudioFrame const from = content->resampled_audio_frame_rate() * 61; + AudioFrame const length = content->resampled_audio_frame_rate() * 4; shared_ptr<ContentAudio> ca = get (from, length); for (int i = 0; i < content->audio_channels(); ++i) { |
