7 #include "cOpenALUtil.h" 9 #include "cMemoryOverride.h" 10 #include "IAudioCapture.h" 11 #include "cSTLAllocator.h" 12 #include "cAudioString.h" 27 ON_USERREQUESTEDBUFFER,
33 virtual bool initialize(
const char* deviceName = 0x0,
unsigned int frequency = 22050,
AudioFormats format = EAF_16BIT_MONO,
unsigned int internalBufferSize = 8192);
48 virtual bool setDevice(
const char* deviceName);
55 virtual unsigned int getCapturedAudio(
void* outputBuffer,
unsigned int outputBufferSize);
59 void getAvailableDevices();
73 bool initOpenALDevice();
74 void shutdownOpenALDevice();
76 unsigned int Frequency;
78 unsigned int InternalBufferSize;
82 cAudioList<ICaptureEventHandler*>::Type eventHandlerList;
87 cAudioString DeviceName;
88 ALCdevice* CaptureDevice;
92 void signalEvent(Events sevent);
virtual unsigned int getFrequency()
Returns the frequency that the captured audio will be at.
virtual bool setInternalBufferSize(unsigned int internalBufferSize)
Sets the internal buffer size that OpenAL will use to store captured audio between calls to getCaptur...
virtual unsigned int getSampleSize()
Returns the size of a "sample" of audio data. Useful for making sure you grab audio data at sample bo...
virtual unsigned int getInternalBufferSize()
Returns the internal OpenAL buffer size in bytes.
IThread * AudioThread
Our update thread.
virtual bool setFormat(AudioFormats format)
Sets the format that the captured audio will be at. Will cause the capture device to be reinitialized...
virtual unsigned int getCurrentCapturedAudioSize()
Returns the current size of the internal audio buffer in bytes.
virtual AudioFormats getFormat()
Returns the format of the captured audio.
virtual void updateCaptureBuffer(bool force=false)
Grabs samples from the OpenAL buffer into the capture buffer if the OpenAL buffer has reached half fu...
Interface for recieving Capture Manager Events.
virtual void stopCapture()
Stops capturing audio data to an internal buffer.
virtual void unRegisterAllEventHandlers()
Removes all event handlers attached to this manager.
virtual AudioCaptureBuffer * getCapturedAudioBuffer()
this method is the same as getCapturedAudio but it returns an managed CaptureBuffer ...
virtual bool setFrequency(unsigned int frequency)
Sets the frequency that the captured audio will be at. Will cause the capture device to be reinitiali...
Interface for capturing operations in the cAudio Engine.
virtual bool setDevice(const char *deviceName)
Sets the audio device . Will cause the capture device to be reinitialized. Calling while in use will ...
virtual unsigned int getCapturedAudio(void *outputBuffer, unsigned int outputBufferSize)
Allows access to the audio data in the internal capture buffer.
virtual bool isReady()
Returns true if the capture device is ready to be used. False may indicate an error with the current ...
virtual bool beginCapture()
Starts capturing audio data to an internal buffer. Will clear any old data in the buffer...
virtual bool initialize(const char *deviceName=0x0, unsigned int frequency=22050, AudioFormats format=EAF_16BIT_MONO, unsigned int internalBufferSize=8192)
Initializes the capture device to the selected settings.
virtual bool isUpdateThreadRunning()
Returns if the thread used to update all Audio Capture Objects is running.
virtual void shutdown()
Shuts down the capture device, clearing the internal buffer and setting the audio capture into an uni...
Overrides the memory allocations for classes derived from it and makes them use the cAudio memory sys...
virtual void unRegisterEventHandler(ICaptureEventHandler *handler)
Removes the specified event handler from this manager.
virtual const char * getDeviceName()
Returns the name of the audio device being used to capture audio.
AudioFormats
Enumeration of audio formats supported by the engine.
virtual void registerEventHandler(ICaptureEventHandler *handler)
Registers a new event handler to this manager.
Main namespace for the entire cAudio library.