YARP
Yet Another Robot Platform
yarp::dev::IAudioRender Class Referenceabstract

#include <yarp/dev/IAudioRender.h>

+ Inheritance diagram for yarp::dev::IAudioRender:

Public Member Functions

virtual ~IAudioRender ()
 Destructor. More...
 
virtual bool renderSound (const yarp::sig::Sound &sound)=0
 Render a sound using a device (i.e. More...
 
virtual bool startPlayback ()=0
 Start the playback. More...
 
virtual bool stopPlayback ()=0
 Stop the playback. More...
 
virtual bool isPlaying (bool &playback_enabled)=0
 Check if the playback has been enabled (e.g. More...
 
virtual bool getPlaybackAudioBufferMaxSize (yarp::dev::AudioBufferSize &size)=0
 
virtual bool getPlaybackAudioBufferCurrentSize (yarp::dev::AudioBufferSize &size)=0
 
virtual bool resetPlaybackAudioBuffer ()=0
 
virtual bool setSWGain (double gain)=0
 Sets a software gain for the played audio. More...
 
virtual bool setHWGain (double gain)=0
 Sets the hardware gain of the playback device (if supported by the hardware) More...
 

Detailed Description

Definition at line 17 of file IAudioRender.h.

Constructor & Destructor Documentation

◆ ~IAudioRender()

yarp::dev::IAudioRender::~IAudioRender ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getPlaybackAudioBufferCurrentSize()

virtual bool yarp::dev::IAudioRender::getPlaybackAudioBufferCurrentSize ( yarp::dev::AudioBufferSize size)
pure virtual

◆ getPlaybackAudioBufferMaxSize()

virtual bool yarp::dev::IAudioRender::getPlaybackAudioBufferMaxSize ( yarp::dev::AudioBufferSize size)
pure virtual

◆ isPlaying()

virtual bool yarp::dev::IAudioRender::isPlaying ( bool &  playback_enabled)
pure virtual

Check if the playback has been enabled (e.g.

via startPlayback()/stopPlayback())

Parameters
playback_enabledthe status of the device
Returns
true/false upon success/failure

Implemented in yarp::dev::AudioPlayerDeviceBase, and PortAudioDeviceDriver.

◆ renderSound()

virtual bool yarp::dev::IAudioRender::renderSound ( const yarp::sig::Sound sound)
pure virtual

Render a sound using a device (i.e.

send it to the speakers).

Parameters
soundthe sound to be rendered
Returns
true/false upon success/failure

Implemented in yarp::dev::AudioPlayerDeviceBase, PortAudioDeviceDriver, and audioToFileDevice.

◆ resetPlaybackAudioBuffer()

virtual bool yarp::dev::IAudioRender::resetPlaybackAudioBuffer ( )
pure virtual

◆ setHWGain()

virtual bool yarp::dev::IAudioRender::setHWGain ( double  gain)
pure virtual

Sets the hardware gain of the playback device (if supported by the hardware)

Parameters
gainthe audio gain (1.0 is the default value)
Returns
true/false upon success/failure

Implemented in PortAudioPlayerDeviceDriver, PortAudioDeviceDriver, fakeSpeaker, and audioToFileDevice.

◆ setSWGain()

virtual bool yarp::dev::IAudioRender::setSWGain ( double  gain)
pure virtual

Sets a software gain for the played audio.

Parameters
gainthe audio gain (1.0 is the default value)
Returns
true/false upon success/failure

Implemented in yarp::dev::AudioPlayerDeviceBase, and PortAudioDeviceDriver.

◆ startPlayback()

virtual bool yarp::dev::IAudioRender::startPlayback ( )
pure virtual

Start the playback.

Returns
true/false upon success/failure

Implemented in yarp::dev::AudioPlayerDeviceBase, PortAudioPlayerDeviceDriver, PortAudioDeviceDriver, and audioToFileDevice.

◆ stopPlayback()

virtual bool yarp::dev::IAudioRender::stopPlayback ( )
pure virtual

Stop the playback.

Returns
true/false upon success/failure

Implemented in yarp::dev::AudioPlayerDeviceBase, PortAudioPlayerDeviceDriver, PortAudioDeviceDriver, and audioToFileDevice.


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