7 #ifndef CAFU_SOUNDSYS_CAPTURE_STREAM_HPP_INCLUDED
8 #define CAFU_SOUNDSYS_CAPTURE_STREAM_HPP_INCLUDED
10 #include "OpenALIncl.hpp"
11 #include "../Common/SoundStream.hpp"
23 CaptureStreamT(
const std::string& DeviceName, ALenum Format=AL_FORMAT_STEREO16,
unsigned int SampleFrq=44100);
29 int Read(
unsigned char* Buffer,
unsigned int Size);
37 unsigned int GetNumCaptureSamples()
const;
38 void ReduceSamplesTo(
unsigned int NumLeft);
39 void PrintDebug()
const;
41 const ALenum m_FORMAT;
42 const unsigned int m_SAMPLE_FRQ;
43 const unsigned int m_MAX_CAPTURE_BUFFER_SAMPLES;
44 ALCdevice* m_CaptureDevice;
46 unsigned int m_ZeroSamples;
unsigned int GetChannels()
Returns the number of channels in the current stream.
Definition: CaptureStream.cpp:175
int Read(unsigned char *Buffer, unsigned int Size)
Reads an amount of bytes from the stream and writes them into the buffer.
Definition: CaptureStream.cpp:98
This class represents a stream whose data is obtained from an OpenAL capture device.
Definition: CaptureStream.hpp:15
unsigned int GetRate()
Get the sampling rate of this stream.
Definition: CaptureStream.cpp:181
Represents a 16 Bit encoded mono or stereo raw PCM data stream.
Definition: SoundStream.hpp:14
~CaptureStreamT()
The destructor.
Definition: CaptureStream.cpp:53
bool Rewind()
Sets the stream back to the beginning.
Definition: CaptureStream.cpp:155
CaptureStreamT(const std::string &DeviceName, ALenum Format=AL_FORMAT_STEREO16, unsigned int SampleFrq=44100)
The constructor.
Definition: CaptureStream.cpp:31