/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 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
}
bool
-SndfileDecoder::pass ()
+SndfileDecoder::pass (PassReason)
{
if (_remaining == 0) {
return true;
/* Do things in half second blocks as I think there may be limits
to what FFmpeg (and in particular the resampler) can cope with.
*/
- sf_count_t const block = _sndfile_content->content_audio_frame_rate() / 2;
+ sf_count_t const block = _sndfile_content->audio_frame_rate() / 2;
sf_count_t const this_time = min (block, _remaining);
int const channels = _sndfile_content->audio_channels ();
return _info.channels;
}
-ContentTime
+Frame
SndfileDecoder::audio_length () const
{
- return ContentTime::from_frames (_info.frames, audio_frame_rate ());
+ return _info.frames;
}
int
void
SndfileDecoder::seek (ContentTime t, bool accurate)
{
- Decoder::seek (t, accurate);
AudioDecoder::seek (t, accurate);
_done = t.frames (audio_frame_rate ());