diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-18 09:39:36 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-18 09:39:36 +0000 |
| commit | 9c399a21b37d83ceb2c81706975e2c46d1a3f673 (patch) | |
| tree | 5b1123cd22cad797c9587c22927f9c9249ed4ca4 /src/lib/sndfile_decoder.cc | |
| parent | da19eaac0dd80afed3dd282d61ea3298196a5090 (diff) | |
Considerable rework of decoder timing; tests pass, at least.
Diffstat (limited to 'src/lib/sndfile_decoder.cc')
| -rw-r--r-- | src/lib/sndfile_decoder.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/sndfile_decoder.cc b/src/lib/sndfile_decoder.cc index b5a7f139b..3af683c57 100644 --- a/src/lib/sndfile_decoder.cc +++ b/src/lib/sndfile_decoder.cc @@ -55,9 +55,13 @@ SndfileDecoder::~SndfileDecoder () delete[] _deinterleave_buffer; } -void +bool SndfileDecoder::pass () { + 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. */ @@ -93,6 +97,8 @@ SndfileDecoder::pass () audio (data, _done); _done += this_time; _remaining -= this_time; + + return true; } int @@ -113,14 +119,10 @@ SndfileDecoder::audio_frame_rate () const return _info.samplerate; } -bool -SndfileDecoder::done () const -{ - return _audio_position >= _sndfile_content->audio_length (); -} - void -SndfileDecoder::seek (DCPTime t, bool accurate) +SndfileDecoder::seek (ContentTime t, bool accurate) { + Decoder::seek (t, accurate); + /* XXX */ } |
