diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-10 14:29:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 504c63b3d62038bc486ca8a09e77fbb403907edd (patch) | |
| tree | d9118c185110dd9eb103ed033700d4b3f486785d /src/lib/sndfile_decoder.cc | |
| parent | 9423e02c37daba7f9e406929a1cfc1bb10fb4b62 (diff) | |
Basics of splitting up Decoder tree like Content.
Diffstat (limited to 'src/lib/sndfile_decoder.cc')
| -rw-r--r-- | src/lib/sndfile_decoder.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/sndfile_decoder.cc b/src/lib/sndfile_decoder.cc index b05750ac8..7762ab1e4 100644 --- a/src/lib/sndfile_decoder.cc +++ b/src/lib/sndfile_decoder.cc @@ -35,12 +35,11 @@ using boost::shared_ptr; SndfileDecoder::SndfileDecoder (shared_ptr<const SndfileContent> c, bool fast, shared_ptr<Log> log) : Sndfile (c) - , AudioDecoder (c->audio, fast, log) , _done (0) , _remaining (_info.frames) , _deinterleave_buffer (0) { - + audio.reset (new AudioDecoder (this, c->audio, fast, log)); } SndfileDecoder::~SndfileDecoder () @@ -87,7 +86,7 @@ SndfileDecoder::pass (PassReason, bool) } data->set_frames (this_time); - audio (_sndfile_content->audio->stream (), data, ContentTime::from_frames (_done, _info.samplerate)); + audio->audio (_sndfile_content->audio->stream (), data, ContentTime::from_frames (_done, _info.samplerate)); _done += this_time; _remaining -= this_time; @@ -97,7 +96,7 @@ SndfileDecoder::pass (PassReason, bool) void SndfileDecoder::seek (ContentTime t, bool accurate) { - AudioDecoder::seek (t, accurate); + audio->seek (t, accurate); _done = t.frames_round (_info.samplerate); _remaining = _info.frames - _done; |
