YARP
Yet Another Robot Platform
Example for AudioPlayerWrapper (AudioPlayerWrapper_portaudioPlayer)

Instantiates AudioPlayerWrapper device implemented by AudioPlayerWrapper. More...

+ Collaboration diagram for Example for AudioPlayerWrapper (AudioPlayerWrapper_portaudioPlayer):

Instantiates AudioPlayerWrapper device implemented by AudioPlayerWrapper.

# start up a network wrapper around a speaker, written via portaudio
device AudioPlayerWrapper
subdevice portaudioPlayer
name /speaker

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

yarpdev --file AudioPlayerWrapper_portaudioPlayer.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("AudioPlayerWrapper_portaudioPlayer.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
debug
period
name
playback_network_buffer_lenght
subdevice
See also
AudioPlayerWrapper