YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches

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.
 
 AudioRecorderWrapper (const AudioRecorderWrapper &)=delete
 
 AudioRecorderWrapper (AudioRecorderWrapper &&)=delete
 
AudioRecorderWrapperoperator= (const AudioRecorderWrapper &)=delete
 
AudioRecorderWrapperoperator= (AudioRecorderWrapper &&)=delete
 
 ~AudioRecorderWrapper () 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
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (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 DeviceDrivergetImplementation ()
 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
 

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::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

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()

bool AudioRecorderWrapper::attach ( yarp::dev::PolyDriver driver)
overridevirtual

Attach to another object.

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

Implements yarp::dev::IWrapper.

Definition at line 219 of file AudioRecorderWrapper.cpp.

◆ close()

bool AudioRecorderWrapper::close ( )
overridevirtual

Shut the object down.

You should override this.

Returns
true/false on success/failure.

Reimplemented from yarp::os::IConfig.

Definition at line 117 of file AudioRecorderWrapper.cpp.

◆ detach()

bool AudioRecorderWrapper::detach ( )
overridevirtual

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

Returns
true/false on success failure.

Implements yarp::dev::IWrapper.

Definition at line 249 of file AudioRecorderWrapper.cpp.

◆ open()

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

Initialize the object.

You should override this.

Parameters
configis a list of parameters for the object. Which parameters are effective for your object can vary.
Returns
true/false upon success/failure

Reimplemented from yarp::os::IConfig.

Definition at line 37 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 141 of file AudioRecorderWrapper.cpp.

Friends And Related Symbol Documentation

◆ AudioRecorderDataThread

friend class AudioRecorderDataThread
friend

Definition at line 92 of file AudioRecorderWrapper.h.

◆ AudioRecorderStatusThread

friend class AudioRecorderStatusThread
friend

Definition at line 91 of file AudioRecorderWrapper.h.


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