YARP
Yet Another Robot Platform

AudioRecorderWrapper: A Wrapper which streams audio over the network, after grabbing it from a device More...

#include <audioRecorderWrapper/AudioRecorderWrapper.h>

+ Inheritance diagram for AudioRecorderWrapper:

Public Member Functions

 AudioRecorderWrapper ()
 Constructor. More...
 
 AudioRecorderWrapper (const AudioRecorderWrapper &)=delete
 
 AudioRecorderWrapper (AudioRecorderWrapper &&)=delete
 
AudioRecorderWrapperoperator= (const AudioRecorderWrapper &)=delete
 
AudioRecorderWrapperoperator= (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...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::dev::IMultipleWrapper
virtual ~IMultipleWrapper ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType () const
 

Friends

class AudioRecorderStatusThread
 
class AudioRecorderDataThread
 

Detailed Description

AudioRecorderWrapper: A Wrapper which streams audio over the network, after grabbing it from a device

Description of input parameters

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.

Constructor & Destructor Documentation

◆ AudioRecorderWrapper() [1/3]

AudioRecorderWrapper::AudioRecorderWrapper ( )

Constructor.

Definition at line 23 of file AudioRecorderWrapper.cpp.

◆ AudioRecorderWrapper() [2/3]

AudioRecorderWrapper::AudioRecorderWrapper ( const AudioRecorderWrapper )
delete

◆ AudioRecorderWrapper() [3/3]

AudioRecorderWrapper::AudioRecorderWrapper ( AudioRecorderWrapper &&  )
delete

◆ ~AudioRecorderWrapper()

AudioRecorderWrapper::~AudioRecorderWrapper ( )
override

Definition at line 32 of file AudioRecorderWrapper.cpp.

Member Function Documentation

◆ attach()

void AudioRecorderWrapper::attach ( yarp::dev::IAudioGrabberSound igrab)

Definition at line 279 of file AudioRecorderWrapper.cpp.

◆ attachAll()

bool AudioRecorderWrapper::attachAll ( const yarp::dev::PolyDriverList drivers)
overridevirtual

Attach to a list of objects.

Parameters
driversthe polydriver list that you want to attach to.
Returns
true/false on success failure.

Implements yarp::dev::IMultipleWrapper.

Definition at line 235 of file AudioRecorderWrapper.cpp.

◆ close()

bool AudioRecorderWrapper::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 136 of file AudioRecorderWrapper.cpp.

◆ detach()

void AudioRecorderWrapper::detach ( )

Definition at line 284 of file AudioRecorderWrapper.cpp.

◆ detachAll()

bool AudioRecorderWrapper::detachAll ( )
overridevirtual

Detach the object (you must have first called attach).

Returns
true/false on success failure.

Implements yarp::dev::IMultipleWrapper.

Definition at line 265 of file AudioRecorderWrapper.cpp.

◆ open()

bool AudioRecorderWrapper::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis 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).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 40 of file AudioRecorderWrapper.cpp.

◆ operator=() [1/2]

AudioRecorderWrapper& AudioRecorderWrapper::operator= ( AudioRecorderWrapper &&  )
delete

◆ operator=() [2/2]

AudioRecorderWrapper& AudioRecorderWrapper::operator= ( const AudioRecorderWrapper )
delete

◆ read()

bool AudioRecorderWrapper::read ( yarp::os::ConnectionReader reader)
overridevirtual

Read this object from a network connection.

Override this for your particular class.

Parameters
readeran interface to the network connection for reading
Returns
true iff the object is successfully read

Implements yarp::os::PortReader.

Definition at line 157 of file AudioRecorderWrapper.cpp.

Friends And Related Function Documentation

◆ AudioRecorderDataThread

friend class AudioRecorderDataThread
friend

Definition at line 95 of file AudioRecorderWrapper.h.

◆ AudioRecorderStatusThread

friend class AudioRecorderStatusThread
friend

Definition at line 94 of file AudioRecorderWrapper.h.


The documentation for this class was generated from the following files: