This class represents a stream whose data is obtained from an OpenAL capture device.
More...
#include "CaptureStream.hpp"
|
| CaptureStreamT (const std::string &DeviceName, ALenum Format=AL_FORMAT_STEREO16, unsigned int SampleFrq=44100) |
| The constructor. More...
|
|
| ~CaptureStreamT () |
| The destructor. More...
|
|
int | Read (unsigned char *Buffer, unsigned int Size) |
| Reads an amount of bytes from the stream and writes them into the buffer. More...
|
|
bool | Rewind () |
| Sets the stream back to the beginning. More...
|
|
unsigned int | GetChannels () |
| Returns the number of channels in the current stream. More...
|
|
unsigned int | GetRate () |
| Get the sampling rate of this stream. More...
|
|
virtual | ~SoundStreamT () |
| Virtual destructor to make sure the destructor of the derived class is called. More...
|
|
This class represents a stream whose data is obtained from an OpenAL capture device.
CaptureStreamT::CaptureStreamT |
( |
const std::string & |
DeviceName, |
|
|
ALenum |
Format = AL_FORMAT_STEREO16 , |
|
|
unsigned int |
SampleFrq = 44100 |
|
) |
| |
The constructor.
Throws an exception of type std::runtime_error on failure.
- Parameters
-
DeviceName | The name of the OpenAL device (as obtained from the ALC_CAPTURE_DEVICE_SPECIFIER list) that is used for capturing. |
Format | The data format in which the samples are captured, kept and returned). Must be AL_FORMAT_MONO16 or AL_FORMAT_STEREO16. |
SampleFrq | The frequency the device is sampled with. |
CaptureStreamT::~CaptureStreamT |
( |
| ) |
|
unsigned int CaptureStreamT::GetChannels |
( |
| ) |
|
|
virtual |
Returns the number of channels in the current stream.
- Returns
- Number of channels in the stream.
Implements SoundStreamT.
unsigned int CaptureStreamT::GetRate |
( |
| ) |
|
|
virtual |
Get the sampling rate of this stream.
- Returns
- The sampling rate in Hz.
Implements SoundStreamT.
int CaptureStreamT::Read |
( |
unsigned char * |
Buffer, |
|
|
unsigned int |
Size |
|
) |
| |
|
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.
Implements SoundStreamT.
bool CaptureStreamT::Rewind |
( |
| ) |
|
|
virtual |
Sets the stream back to the beginning.
Implements SoundStreamT.
The documentation for this class was generated from the following files:
- Libs/SoundSystem/SoundSysOpenAL/CaptureStream.hpp
- Libs/SoundSystem/SoundSysOpenAL/CaptureStream.cpp