cAudio
2.3.0
3d Audio Engine
|
7 #include "EAudioFormats.h"
8 #include "cAudioDefines.h"
9 #include "ICaptureEventHandler.h"
14 class AudioCaptureBuffer;
31 virtual bool initialize(
const char* deviceName = 0x0,
unsigned int frequency = 22050,
AudioFormats format = EAF_16BIT_MONO,
unsigned int internalBufferSize = 8192) = 0;
94 virtual unsigned int getCapturedAudio(
void* outputBuffer,
unsigned int outputBufferSize) = 0;
119 buffer =
new char[length];
134 const char* getReadBuffer()
const
139 char* getWriteBuffer()
144 size_t getLength()
const
AudioFormats
Enumeration of audio formats supported by the engine.
virtual bool setFormat(AudioFormats format)=0
Sets the format that the captured audio will be at. Will cause the capture device to be reinitialized...
virtual unsigned int getSampleSize()=0
Returns the size of a "sample" of audio data. Useful for making sure you grab audio data at sample bo...
virtual void shutdown()=0
Shuts down the capture device, clearing the internal buffer and setting the audio capture into an uni...
virtual void registerEventHandler(ICaptureEventHandler *handler)=0
Registers a new event handler to this manager.
virtual bool isUpdateThreadRunning()=0
Returns if the thread used to update all Audio Capture Objects is running.
Interface for capturing operations in the cAudio Engine.
virtual bool initialize(const char *deviceName=0x0, unsigned int frequency=22050, AudioFormats format=EAF_16BIT_MONO, unsigned int internalBufferSize=8192)=0
Initializes the capture device to the selected settings.
Main namespace for the entire cAudio library.
Interface for recieving Capture Manager Events.
virtual bool beginCapture()=0
Starts capturing audio data to an internal buffer. Will clear any old data in the buffer.
virtual unsigned int getCapturedAudio(void *outputBuffer, unsigned int outputBufferSize)=0
Allows access to the audio data in the internal capture buffer.
virtual bool setInternalBufferSize(unsigned int internalBufferSize)=0
Sets the internal buffer size that OpenAL will use to store captured audio between calls to getCaptur...
virtual AudioCaptureBuffer * getCapturedAudioBuffer()=0
this method is the same as getCapturedAudio but it returns an managed CaptureBuffer
virtual void unRegisterEventHandler(ICaptureEventHandler *handler)=0
Removes the specified event handler from this manager.
virtual const char * getDeviceName()=0
Returns the name of the audio device being used to capture audio.
virtual void updateCaptureBuffer(bool force=false)=0
Grabs samples from the OpenAL buffer into the capture buffer if the OpenAL buffer has reached half fu...
virtual AudioFormats getFormat()=0
Returns the format of the captured audio.
virtual void stopCapture()=0
Stops capturing audio data to an internal buffer.
virtual unsigned int getCurrentCapturedAudioSize()=0
Returns the current size of the internal audio buffer in bytes.
virtual bool setDevice(const char *deviceName)=0
Sets the audio device . Will cause the capture device to be reinitialized. Calling while in use will ...
virtual bool setFrequency(unsigned int frequency)=0
Sets the frequency that the captured audio will be at. Will cause the capture device to be reinitiali...
virtual unsigned int getFrequency()=0
Returns the frequency that the captured audio will be at.
virtual bool isReady()=0
Returns true if the capture device is ready to be used. False may indicate an error with the current ...
virtual void unRegisterAllEventHandlers()=0
Removes all event handlers attached to this manager.
virtual unsigned int getInternalBufferSize()=0
Returns the internal OpenAL buffer size in bytes.