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) {
}
}
-/* XXX: called? */
void
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
void audio (boost::shared_ptr<const AudioBuffers>, ContentTime);
void flush ();
void reset_decoded_audio ();
+ void add (boost::shared_ptr<const AudioBuffers>);
boost::shared_ptr<const AudioContent> _audio_content;
boost::shared_ptr<Resampler> _resampler;