Represents a 16 Bit encoded mono or stereo raw PCM data stream.
More...
#include "SoundStream.hpp"
|
virtual int | Read (unsigned char *Buffer, unsigned int Size)=0 |
| Reads an amount of bytes from the stream and writes them into the buffer. More...
|
|
virtual bool | Rewind ()=0 |
| Sets the stream back to the beginning. More...
|
|
virtual unsigned int | GetChannels ()=0 |
| Returns the number of channels in the current stream. More...
|
|
virtual unsigned int | GetRate ()=0 |
| Get the sampling rate of this stream. More...
|
|
virtual | ~SoundStreamT () |
| Virtual destructor to make sure the destructor of the derived class is called. More...
|
|
Represents a 16 Bit encoded mono or stereo raw PCM data stream.
virtual SoundStreamT::~SoundStreamT |
( |
| ) |
|
|
inlinevirtual |
Virtual destructor to make sure the destructor of the derived class is called.
SoundStreamT * SoundStreamT::Create |
( |
const std::string & |
ResName | ) |
|
|
static |
Creates a new sound stream for the specified resource.
- Parameters
-
ResName | The name of the stream resource. ResName can be a file name or the name of an OpenAL capture device (as obtained from the ALC_CAPTURE_DEVICE_SPECIFIER list). |
- Returns
- the created sound stream instance. Throws an exception of type std::runtime_error on failure.
virtual unsigned int SoundStreamT::GetChannels |
( |
| ) |
|
|
pure virtual |
virtual unsigned int SoundStreamT::GetRate |
( |
| ) |
|
|
pure virtual |
virtual int SoundStreamT::Read |
( |
unsigned char * |
Buffer, |
|
|
unsigned int |
Size |
|
) |
| |
|
pure virtual |
Reads an amount of bytes from the stream and writes them into the buffer.
- Parameters
-
Buffer | Buffer to write the data into. |
Size | Amount of bytes to be read from the stream and write in the buffer. |
- Returns
- Number of bytes wrote into the buffer. -1 if an error occured during reading.
Implemented in OggVorbisStreamT, MP3StreamT, and CaptureStreamT.
virtual bool SoundStreamT::Rewind |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following files:
- Libs/SoundSystem/Common/SoundStream.hpp
- Libs/SoundSystem/Common/SoundStream.cpp