xoreos  0.0.5
Public Member Functions | List of all members
Sound::PacketizedAudioStream Class Referenceabstract

An AudioStream designed to work in terms of packets. More...

#include <audiostream.h>

Inheritance diagram for Sound::PacketizedAudioStream:
Inheritance graph
[legend]
Collaboration diagram for Sound::PacketizedAudioStream:
Collaboration graph
[legend]

Public Member Functions

virtual ~PacketizedAudioStream ()
 
virtual void queuePacket (Common::SeekableReadStream *data)=0
 Queue the next packet to be decoded. More...
 
virtual void finish ()=0
 Mark this stream as finished. More...
 
virtual bool isFinished () const =0
 Is the stream marked as finished? More...
 
- Public Member Functions inherited from Sound::AudioStream
virtual ~AudioStream ()
 
virtual size_t readBuffer (int16 *buffer, const size_t numSamples)=0
 Fill the given buffer with up to numSamples samples. More...
 
virtual int getChannels () const =0
 Return the number channels in this stream. More...
 
virtual int getRate () const =0
 Sample rate of the stream. More...
 
virtual bool endOfData () const =0
 End of data reached? If this returns true, it means that at this time there is no data available in the stream. More...
 
virtual bool endOfStream () const
 End of stream reached? If this returns true, it means that all data in this stream is used up and no additional data will appear in it in the future. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Sound::AudioStream
static const size_t kSizeInvalid = SIZE_MAX
 

Detailed Description

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.

Definition at line 271 of file audiostream.h.

Constructor & Destructor Documentation

◆ ~PacketizedAudioStream()

virtual Sound::PacketizedAudioStream::~PacketizedAudioStream ( )
inlinevirtual

Definition at line 273 of file audiostream.h.

Member Function Documentation

◆ finish()

virtual void Sound::PacketizedAudioStream::finish ( )
pure virtual

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'.

Implemented in Sound::StatelessPacketizedAudioStream, Sound::PacketizedVorbisStream, Sound::WMACodec, and Sound::AACDecoder.

◆ isFinished()

virtual bool Sound::PacketizedAudioStream::isFinished ( ) const
pure virtual

◆ queuePacket()

virtual void Sound::PacketizedAudioStream::queuePacket ( Common::SeekableReadStream data)
pure virtual

The documentation for this class was generated from the following file: