AudioRecorder_nws_yarp
: A Wrapper which streams audio over the network, after grabbing it from a device.
More...
#include <audioRecorder_nws_yarp/AudioRecorder_nws_yarp.h>
Public Member Functions | |
AudioRecorder_nws_yarp () | |
Constructor. | |
AudioRecorder_nws_yarp (const AudioRecorder_nws_yarp &)=delete | |
AudioRecorder_nws_yarp (AudioRecorder_nws_yarp &&)=delete | |
AudioRecorder_nws_yarp & | operator= (const AudioRecorder_nws_yarp &)=delete |
AudioRecorder_nws_yarp & | operator= (AudioRecorder_nws_yarp &&)=delete |
~AudioRecorder_nws_yarp () override | |
bool | open (yarp::os::Searchable &config) override |
Initialize the object. | |
bool | close () override |
Shut the object down. | |
bool | attach (yarp::dev::PolyDriver *driver) override |
Attach to another object. | |
bool | detach () override |
Detach the object (you must have first called attach). | |
bool | read (yarp::os::ConnectionReader &connection) override |
Read this object from a network connection. | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
~DeviceDriver () override | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the DeviceDriver. | |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. | |
virtual void | setId (const std::string &id) |
Set the id for this device. | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. | |
Public Member Functions inherited from yarp::os::IConfig | |
virtual | ~IConfig () |
Destructor. | |
virtual bool | configure (Searchable &config) |
Change online parameters. | |
Public Member Functions inherited from yarp::dev::WrapperSingle | |
~WrapperSingle () override | |
Destructor. | |
bool | attachAll (const yarp::dev::PolyDriverList &drivers) final |
Attach to a list of objects. | |
bool | detachAll () final |
Detach the object (you must have first called attach). | |
Public Member Functions inherited from yarp::dev::IWrapper | |
virtual | ~IWrapper () |
Destructor. | |
Public Member Functions inherited from yarp::dev::IMultipleWrapper | |
virtual | ~IMultipleWrapper () |
Destructor. | |
Public Member Functions inherited from yarp::os::PortReader | |
virtual | ~PortReader () |
Destructor. | |
virtual Type | getReadType () const |
Friends | |
class | AudioRecorderStatusThread |
class | AudioRecorderDataThread |
AudioRecorder_nws_yarp
: 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::getSound() method |
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::getSound() method |
max_samples_timeout | - | float | s | 1.0 | No | timeout for sample collection | the algorithm is implemented in AudioRecorderDeviceBase::getSound() method |
start | - | bool | - | false | No | automatically activates the recording when the device is started | if false, the recording is enabled via rpc port |
send_sound_on_stop | - | bool | - | true | No | send the sound when the stop rpc is called, even if it does not met network size parameters | it will not send empty sounds |
See Audio in YARP for additional documentation on YARP audio.
Definition at line 50 of file AudioRecorder_nws_yarp.h.
AudioRecorder_nws_yarp::AudioRecorder_nws_yarp | ( | ) |
Constructor.
Definition at line 23 of file AudioRecorder_nws_yarp.cpp.
|
delete |
|
delete |
|
override |
Definition at line 32 of file AudioRecorder_nws_yarp.cpp.
|
overridevirtual |
Attach to another object.
driver | the polydriver that you want to attach to. |
Implements yarp::dev::IWrapper.
Definition at line 133 of file AudioRecorder_nws_yarp.cpp.
|
overridevirtual |
Shut the object down.
You should override this.
Reimplemented from yarp::os::IConfig.
Definition at line 98 of file AudioRecorder_nws_yarp.cpp.
|
overridevirtual |
Detach the object (you must have first called attach).
Implements yarp::dev::IWrapper.
Definition at line 164 of file AudioRecorder_nws_yarp.cpp.
|
overridevirtual |
Initialize the object.
You should override this.
config | is a list of parameters for the object. Which parameters are effective for your object can vary. |
Reimplemented from yarp::os::IConfig.
Definition at line 37 of file AudioRecorder_nws_yarp.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 122 of file AudioRecorder_nws_yarp.cpp.
|
friend |
Definition at line 100 of file AudioRecorder_nws_yarp.h.
|
friend |
Definition at line 99 of file AudioRecorder_nws_yarp.h.