Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Protected Member Functions | List of all members
om::sound::base::SoundDataInputStream Class Reference

A class that wraps a sound decoder and its data stream source. More...

#include <omSoundDataInputStream.h>

Inheritance diagram for om::sound::base::SoundDataInputStream:
om::sound::base::SoundInputStream

Public Member Functions

 SoundDataInputStream (const Shared< SoundInputStream > &soundStream, const Shared< DataInputStream > &dataStream)
 Create a new sound data input stream that wraps the specified sound stream and data stream. More...
 
 ~SoundDataInputStream ()
 Destroy this sound data input stream and release any resources associated with it. More...
 
virtual Bool canSeek () const
 Return whether or not seeking is allowed in this input stream. More...
 
virtual Bool canSeek (Int64 relativeSampleOffset) const
 Return whether or not this input stream's current position can be moved by the specified signed sample offset. More...
 
virtual Int64 seek (Int64 relativeSampleOffset)
 Move the current sample frame position in the stream by the specified signed amount. More...
 
virtual SoundSize getSamplesRemaining () const
 Return the number of samples remaining in the sound input stream. More...
 
virtual SampleIndex getPosition () const
 Return the current position of the stream in samples relative to the start of the stream. More...
 
virtual Size getChannelCount () const
 Return the number of channels that are in the sound input stream. More...
 
virtual SampleRate getSampleRate () const
 Return the sample rate of the sound input stream's source audio data. More...
 
virtual SampleType getNativeSampleType () const
 Return the actual sample type used in the stream. More...
 
virtual Bool isValid () const
 Return whether or not the stream has a valid source of sound data. More...
 
- Public Member Functions inherited from om::sound::base::SoundInputStream
virtual ~SoundInputStream ()
 Destroy this sound input stream and release any resources associated with it. More...
 
SoundResult read (SoundBuffer &buffer, Size numSamples)
 Read the specified number of samples from the input stream into a sound buffer. More...
 
Bool hasSamplesRemaining () const
 Return whether or not this sound input stream has any samples remaining in the stream. More...
 

Protected Member Functions

virtual SoundResult readSamples (SoundBuffer &inputBuffer, Size numSamples)
 Read the specified number of samples from the input stream into the output buffer. More...
 

Detailed Description

A class that wraps a sound decoder and its data stream source.

Constructor & Destructor Documentation

om::sound::base::SoundDataInputStream::SoundDataInputStream ( const Shared< SoundInputStream > &  soundStream,
const Shared< DataInputStream > &  dataStream 
)

Create a new sound data input stream that wraps the specified sound stream and data stream.

om::sound::base::SoundDataInputStream::~SoundDataInputStream ( )

Destroy this sound data input stream and release any resources associated with it.

Member Function Documentation

virtual Bool om::sound::base::SoundDataInputStream::canSeek ( ) const
virtual

Return whether or not seeking is allowed in this input stream.

Reimplemented from om::sound::base::SoundInputStream.

virtual Bool om::sound::base::SoundDataInputStream::canSeek ( Int64  relativeSampleOffset) const
virtual

Return whether or not this input stream's current position can be moved by the specified signed sample offset.

Reimplemented from om::sound::base::SoundInputStream.

virtual Int64 om::sound::base::SoundDataInputStream::seek ( Int64  relativeSampleOffset)
virtual

Move the current sample frame position in the stream by the specified signed amount.

Reimplemented from om::sound::base::SoundInputStream.

virtual SoundSize om::sound::base::SoundDataInputStream::getSamplesRemaining ( ) const
virtual

Return the number of samples remaining in the sound input stream.

Implements om::sound::base::SoundInputStream.

virtual SampleIndex om::sound::base::SoundDataInputStream::getPosition ( ) const
virtual

Return the current position of the stream in samples relative to the start of the stream.

Implements om::sound::base::SoundInputStream.

virtual Size om::sound::base::SoundDataInputStream::getChannelCount ( ) const
virtual

Return the number of channels that are in the sound input stream.

This is the number of channels of sound data that will be read with each read call to the stream's read() method.

Implements om::sound::base::SoundInputStream.

virtual SampleRate om::sound::base::SoundDataInputStream::getSampleRate ( ) const
virtual

Return the sample rate of the sound input stream's source audio data.

Implements om::sound::base::SoundInputStream.

virtual SampleType om::sound::base::SoundDataInputStream::getNativeSampleType ( ) const
virtual

Return the actual sample type used in the stream.

Implements om::sound::base::SoundInputStream.

virtual Bool om::sound::base::SoundDataInputStream::isValid ( ) const
virtual

Return whether or not the stream has a valid source of sound data.

Implements om::sound::base::SoundInputStream.

virtual SoundResult om::sound::base::SoundDataInputStream::readSamples ( SoundBuffer inputBuffer,
Size  numSamples 
)
protectedvirtual

Read the specified number of samples from the input stream into the output buffer.

Implements om::sound::base::SoundInputStream.


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