using std::map;
using boost::shared_ptr;
-AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, bool fast, shared_ptr<Log> log)
- : _ignore (false)
- , _fast (fast)
+AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, shared_ptr<Log> log)
+ : DecoderPart (parent, log)
{
BOOST_FOREACH (AudioStreamPtr i, content->streams ()) {
- _streams[i] = shared_ptr<AudioDecoderStream> (new AudioDecoderStream (content, i, parent, fast, log));
+ _streams[i] = shared_ptr<AudioDecoderStream> (new AudioDecoderStream (content, i, parent, this, log));
}
}
void
AudioDecoder::give (AudioStreamPtr stream, shared_ptr<const AudioBuffers> data, ContentTime time)
{
- if (_ignore) {
+ if (ignore ()) {
return;
}
}
}
-/** Set this decoder never to produce any data */
void
-AudioDecoder::set_ignore ()
+AudioDecoder::set_fast ()
{
- _ignore = true;
+ for (map<AudioStreamPtr, shared_ptr<AudioDecoderStream> >::const_iterator i = _streams.begin(); i != _streams.end(); ++i) {
+ i->second->set_fast ();
+ }
}