diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-23 10:09:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-23 10:09:08 +0100 |
| commit | 93d6bd98279b2c912daffa2c91484121085d8dca (patch) | |
| tree | 28dbd42736dbde8c7ca8c3ba6fe7e875fc93d485 /src/lib/audio_decoder.cc | |
| parent | 3620abae2f1aee79e80c2d12bf3fa97b74cf77f8 (diff) | |
Reinstate AudioDecoder::flush().
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index 3d5698dfe..e4c82f64c 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -168,6 +168,12 @@ AudioDecoder::audio (shared_ptr<const AudioBuffers> data, ContentTime time) assert (_audio_position.get() >= (_decoded_audio.frame + _decoded_audio.audio->frames())); + add (data); +} + +void +AudioDecoder::add (shared_ptr<const AudioBuffers> data) +{ /* Resize _decoded_audio to fit the new data */ int new_size = 0; if (_decoded_audio.audio->frames() == 0) { @@ -196,7 +202,6 @@ AudioDecoder::audio (shared_ptr<const AudioBuffers> data, ContentTime time) } } -/* XXX: called? */ void AudioDecoder::flush () { @@ -204,13 +209,10 @@ AudioDecoder::flush () return; } - /* shared_ptr<const AudioBuffers> b = _resampler->flush (); if (b) { - _pending.push_back (shared_ptr<DecodedAudio> (new DecodedAudio (b, _audio_position.get ()))); - _audio_position = _audio_position.get() + b->frames (); + add (b); } - */ } void |
