ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge
Inheritance diagram for Audio::ASFStream:
Collaboration diagram for Audio::ASFStream:

List of all members.

Classes

struct  Packet

Public Member Functions

 ASFStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse)
 ~ASFStream ()
int readBuffer (int16 *buffer, const int numSamples)
 Fill the given buffer with up to numSamples samples.
bool endOfData () const
 End of data reached? If this returns true, it means that at this time there is no data available in the stream.
bool isStereo () const
 Is this a stereo stream?
int getRate () const
 Sample rate of the stream.
Timestamp getLength () const
 Returns the length of the stream.
bool seek (const Timestamp &where)
 Seeks to a given offset in the stream.
bool rewind ()
 Rewinds the stream to its start.

Private Member Functions

void parseStreamHeader ()
void parseFileHeader ()
PacketreadPacket ()
CodeccreateCodec ()
AudioStreamcreateAudioStream ()

Private Attributes

Common::SeekableReadStream_stream
DisposeAfterUse::Flag _disposeAfterUse
uint32 _rewindPos
uint64 _curPacket
Packet_lastPacket
Codec_codec
AudioStream_curAudioStream
byte _curSequenceNumber
uint64 _packetCount
uint64 _duration
uint32 _minPacketSize
uint32 _maxPacketSize
uint16 _streamID
uint16 _compression
uint16 _channels
int _sampleRate
uint32 _bitRate
uint16 _blockAlign
uint16 _bitsPerCodedSample
Common::SeekableReadStream_extraData

Detailed Description

Definition at line 79 of file asf.cpp.


Constructor & Destructor Documentation

Audio::ASFStream::ASFStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse 
)

Definition at line 157 of file asf.cpp.

Audio::ASFStream::~ASFStream (  ) 

Definition at line 211 of file asf.cpp.


Member Function Documentation

AudioStream * Audio::ASFStream::createAudioStream (  )  [private]

Definition at line 394 of file asf.cpp.

Codec * Audio::ASFStream::createCodec (  )  [private]

Definition at line 383 of file asf.cpp.

bool Audio::ASFStream::endOfData (  )  const [virtual]

End of data reached? If this returns true, it means that at this time there is no data available in the stream.

However there may be more data in the future. This is used by e.g. a rate converter to decide whether to keep on converting data or stop.

Implements Audio::AudioStream.

Definition at line 451 of file asf.cpp.

Timestamp Audio::ASFStream::getLength (  )  const [inline, virtual]

Returns the length of the stream.

Returns:
length as Timestamp.

Implements Audio::SeekableAudioStream.

Definition at line 90 of file asf.cpp.

int Audio::ASFStream::getRate (  )  const [inline, virtual]

Sample rate of the stream.

Implements Audio::AudioStream.

Definition at line 89 of file asf.cpp.

bool Audio::ASFStream::isStereo (  )  const [inline, virtual]

Is this a stereo stream?

Implements Audio::AudioStream.

Definition at line 88 of file asf.cpp.

void Audio::ASFStream::parseFileHeader (  )  [private]

Definition at line 220 of file asf.cpp.

void Audio::ASFStream::parseStreamHeader (  )  [private]

Definition at line 239 of file asf.cpp.

int Audio::ASFStream::readBuffer ( int16 buffer,
const int  numSamples 
) [virtual]

Fill the given buffer with up to numSamples samples.

Returns the actual number of samples read, or -1 if a critical error occurred (note: you *must* check if this value is less than what you requested, this can happen when the stream is fully used up).

Data has to be in native endianess, 16 bit per sample, signed. For stereo stream, buffer will be filled with interleaved left and right channel samples, starting with a left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo stream, you will get a total of two left channel and two right channel samples.

Implements Audio::AudioStream.

Definition at line 426 of file asf.cpp.

ASFStream::Packet * Audio::ASFStream::readPacket (  )  [private]

Definition at line 295 of file asf.cpp.

bool Audio::ASFStream::rewind (  )  [virtual]

Rewinds the stream to its start.

Returns:
true on success, false otherwise.

Reimplemented from Audio::SeekableAudioStream.

Definition at line 278 of file asf.cpp.

bool Audio::ASFStream::seek ( const Timestamp where  )  [virtual]

Seeks to a given offset in the stream.

Parameters:
where offset as timestamp
Returns:
true on success, false on failure.

Implements Audio::SeekableAudioStream.

Definition at line 269 of file asf.cpp.


Member Data Documentation

Definition at line 142 of file asf.cpp.

Definition at line 144 of file asf.cpp.

Definition at line 143 of file asf.cpp.

Definition at line 140 of file asf.cpp.

Definition at line 128 of file asf.cpp.

Definition at line 139 of file asf.cpp.

Definition at line 129 of file asf.cpp.

Definition at line 126 of file asf.cpp.

Definition at line 130 of file asf.cpp.

Definition at line 134 of file asf.cpp.

Definition at line 145 of file asf.cpp.

Definition at line 127 of file asf.cpp.

Definition at line 135 of file asf.cpp.

Definition at line 135 of file asf.cpp.

Definition at line 133 of file asf.cpp.

Definition at line 125 of file asf.cpp.

Definition at line 141 of file asf.cpp.

Definition at line 116 of file asf.cpp.

Definition at line 138 of file asf.cpp.


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


Generated on Sat Mar 23 2019 05:06:39 for ResidualVM by doxygen 1.7.1
curved edge   curved edge