AudioRecorderWrapper
: A Wrapper which streams audio over the network, after grabbing it from a device
More...
#include <audioRecorderWrapper/AudioRecorderWrapper.h>
Public Member Functions | |
AudioRecorderWrapper () | |
Constructor. More... | |
AudioRecorderWrapper (const AudioRecorderWrapper &)=delete | |
AudioRecorderWrapper (AudioRecorderWrapper &&)=delete | |
AudioRecorderWrapper & | operator= (const AudioRecorderWrapper &)=delete |
AudioRecorderWrapper & | operator= (AudioRecorderWrapper &&)=delete |
~AudioRecorderWrapper () override | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. More... | |
bool | close () override |
Close the DeviceDriver. More... | |
bool | attachAll (const yarp::dev::PolyDriverList &p) override |
Attach to a list of objects. More... | |
bool | detachAll () override |
Detach the object (you must have first called attach). More... | |
void | attach (yarp::dev::IAudioGrabberSound *igrab) |
void | detach () |
bool | read (yarp::os::ConnectionReader &connection) override |
Read this object from a network connection. More... | |
![]() | |
~DeviceDriver () override=default | |
Destructor. More... | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. More... | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. More... | |
![]() | |
virtual | ~IConfig () |
Destructor. More... | |
virtual bool | configure (Searchable &config) |
Change online parameters. More... | |
![]() | |
virtual | ~IMultipleWrapper () |
Destructor. More... | |
![]() | |
virtual | ~PortReader () |
Destructor. More... | |
virtual Type | getReadType () const |
Friends | |
class | AudioRecorderStatusThread |
class | AudioRecorderDataThread |
AudioRecorderWrapper
: A Wrapper which streams audio over the network, after grabbing it from a device
Parameters required by this device are:
Parameter name | SubParameter | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|---|
name | - | string | - | /audioRecorderWrapper | No | full name of the port opened by the device | MUST start with a '/' character, xxx/audio:o and xxx/rpc suffixes are appended |
period | - | int | ms | 20 | No | period of the internal thread, in ms | default 20ms |
debug | - | bool | - | - | No | developers use only | |
min_samples_over_network | - | int | samples | 11250 | No | sends the network packet ifs n samples are collected AND the timeout is expired | the algorithm is implemented in AudioRecorderDeviceBase |
max_samples_over_network | - | int | samples | 11250 | No | sends the network packet as soon as n samples have been collected | the algorithm is implemented in AudioRecorderDeviceBase |
max_samples_timeout | - | float | s | 1.0 | No | timeout for sample collection | the algorithm is implemented in AudioRecorderDeviceBase |
start | - | bool | - | false | No | automatically activates the recording when the device is started | if false, the recording is enabled via rpc port |
See Audio in YARP for additional documentation on YARP audio.
Definition at line 46 of file AudioRecorderWrapper.h.
AudioRecorderWrapper::AudioRecorderWrapper | ( | ) |
Constructor.
Definition at line 23 of file AudioRecorderWrapper.cpp.
|
delete |
|
delete |
|
override |
Definition at line 32 of file AudioRecorderWrapper.cpp.
void AudioRecorderWrapper::attach | ( | yarp::dev::IAudioGrabberSound * | igrab | ) |
Definition at line 279 of file AudioRecorderWrapper.cpp.
|
overridevirtual |
Attach to a list of objects.
drivers | the polydriver list that you want to attach to. |
Implements yarp::dev::IMultipleWrapper.
Definition at line 235 of file AudioRecorderWrapper.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 136 of file AudioRecorderWrapper.cpp.
void AudioRecorderWrapper::detach | ( | ) |
Definition at line 284 of file AudioRecorderWrapper.cpp.
|
overridevirtual |
Detach the object (you must have first called attach).
Implements yarp::dev::IMultipleWrapper.
Definition at line 265 of file AudioRecorderWrapper.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 40 of file AudioRecorderWrapper.cpp.
|
delete |
|
delete |
|
overridevirtual |
Read this object from a network connection.
Override this for your particular class.
reader | an interface to the network connection for reading |
Implements yarp::os::PortReader.
Definition at line 157 of file AudioRecorderWrapper.cpp.
|
friend |
Definition at line 95 of file AudioRecorderWrapper.h.
|
friend |
Definition at line 94 of file AudioRecorderWrapper.h.