YARP
Yet Another Robot Platform
Example for AudioRecorderWrapper (AudioRecorderWrapper_portaudioRecorder)

Instantiates AudioRecorderWrapper device implemented by AudioRecorderWrapper. More...

+ Collaboration diagram for Example for AudioRecorderWrapper (AudioRecorderWrapper_portaudioRecorder):

Instantiates AudioRecorderWrapper device implemented by AudioRecorderWrapper.

# start up a network wrapper around a microphone, read via portaudio
device AudioRecorderWrapper
subdevice portaudioRecorder
name /microphone
start

If this text is saved in a file called AudioRecorderWrapper_portaudioRecorder.ini then the device can be created by doing:

yarpdev --file AudioRecorderWrapper_portaudioRecorder.ini

Of course, the configuration could be passed just as command line options, or as a yarp::os::Property object in a program:

Property p;
p.fromConfigFile("AudioRecorderWrapper_portaudioRecorder.ini");
// of course you could construct the Property object on-the-fly
PolyDriver dev;
dev.open(p);
if (dev.isValid()) { /* use the device via view method */ }

Here is a list of properties checked when starting up a device based on this configuration file. Note that which properties are checked can depend on whether other properties are present. In some cases properties can also vary between operating systems. So this is just an example

PROPERTYDESCRIPTIONDEFAULT
device
period
subdevice
min_samples_over_network
max_samples_over_network
max_samples_timeout
name
start
See also
AudioRecorderWrapper