diff options
author | Matthew Hoops | 2015-08-09 20:04:25 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-08-30 19:53:53 -0400 |
commit | ccd8dbf4baba33bda41d1d8aa7657ef7d1400463 (patch) | |
tree | 31fd0bbe7e781db9ec9394886fb7504ecd11fb52 /audio | |
parent | 52f67cba39f466c41ec7e6505e7f48626642e62e (diff) | |
download | scummvm-rg350-ccd8dbf4baba33bda41d1d8aa7657ef7d1400463.tar.gz scummvm-rg350-ccd8dbf4baba33bda41d1d8aa7657ef7d1400463.tar.bz2 scummvm-rg350-ccd8dbf4baba33bda41d1d8aa7657ef7d1400463.zip |
AUDIO: Add an AudioStream subclass for packetized audio
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audiostream.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/audio/audiostream.h b/audio/audiostream.h index 840a25abda..c3dbdcf736 100644 --- a/audio/audiostream.h +++ b/audio/audiostream.h @@ -30,6 +30,10 @@ #include "audio/timestamp.h" +namespace Common { +class SeekableReadStream; +} + namespace Audio { /** @@ -367,6 +371,30 @@ Timestamp convertTimeToStreamPos(const Timestamp &where, int rate, bool isStereo */ AudioStream *makeLimitingAudioStream(AudioStream *parentStream, const Timestamp &length, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); +/** + * An AudioStream designed to work in terms of packets. + * + * It is similar in concept to QueuingAudioStream, but does not + * necessarily rely on the data from each queued AudioStream + * being separate. + */ +class PacketizedAudioStream : public virtual AudioStream { +public: + virtual ~PacketizedAudioStream() {} + + /** + * Queue the next packet to be decoded. + */ + virtual void queuePacket(Common::SeekableReadStream *data) = 0; + + /** + * Mark this stream as finished. That is, signal that no further data + * will be queued to it. Only after this has been done can this + * stream ever 'end'. + */ + virtual void finish() = 0; +}; + } // End of namespace Audio #endif |