gramods
|
The instantiation of this class will attempt to open a capture device and allow for extraction of sample data from this. More...
#include <OpenALCapture.hh>
Classes | |
struct | Impl |
Public Member Functions | |
void | setDeviceName (std::string name) |
Sets the name of the capture device to open and capture from. More... | |
void | setSampleRate (size_t f) |
Sets the sample rate to attempt to open the capture device with. More... | |
size_t | getSampleRate () override |
Returns the sample rate. More... | |
void | setChannelCount (size_t n) |
Sets the number of channels to attempt to open for the capture device. More... | |
size_t | getChannelCount () override |
Sets the number of channels to attempt to open for the capture device. More... | |
bool | isOpen () override |
void | startCapture () override |
void | stopCapture () override |
std::vector< float > | getAvailableSamples () override |
size_t | getAvailableSamplesCount () override |
void | initialize () override |
Called to initialize the Object. More... | |
![]() | |
std::string | getDefaultKey () override |
Returns the default key for the Object when automatically instantiated in a Configuration, i.e. More... | |
![]() | |
Object () | |
Initializes internal data. More... | |
virtual | ~Object () |
Cleaning up internal data. More... | |
virtual void | accept (Visitor *visitor) |
Calls the visitors apply method with this as argument. More... | |
virtual void | traverse (Visitor *visitor) |
Calls the child Object's accept method, if such exist. More... | |
bool | isInitialized () |
Returns true if the Object is initialized. More... | |
Static Public Member Functions | |
static std::vector< std::string > | getCaptureDeviceNames () |
![]() | |
template<size_t N> | |
static std::array< std::vector< float >, N > | deinterlaceSamples (std::vector< float > data) |
De-interlaces the input sample data into an array of N vectors each with an Nth of the original samples. More... | |
static std::vector< std::vector< float > > | deinterlaceSamples (std::vector< float > data, size_t N) |
De-interlaces the input sample data into an array of N vectors each with an Nth of the original samples. More... | |
Public Attributes | |
GM_OFI_DECLARE | |
The instantiation of this class will attempt to open a capture device and allow for extraction of sample data from this.
|
overridevirtual |
Sets the number of channels to attempt to open for the capture device.
Implements gramods::gmSound::Capture.
|
overridevirtual |
Returns the sample rate.
Implements gramods::gmSound::Capture.
|
overridevirtual |
Called to initialize the Object.
This should be called once only!
Sub classes should override this method to make use of set parameter data. They should also always call its base class' implementation as well.
Reimplemented from gramods::gmCore::Object.
void gramods::gmSound::OpenALCapture::setChannelCount | ( | size_t | n | ) |
Sets the number of channels to attempt to open for the capture device.
XML-attribute: channelCount
void gramods::gmSound::OpenALCapture::setDeviceName | ( | std::string | name | ) |
Sets the name of the capture device to open and capture from.
XML-attribute: deviceName
void gramods::gmSound::OpenALCapture::setSampleRate | ( | size_t | f | ) |
Sets the sample rate to attempt to open the capture device with.
Default is 44100 samples per second.
XML-attribute: sampleRate