YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::IAudioRender Class Referenceabstract

Interface for rendering a YARP-format sound and controlling its reproduction ona device. More...

#include <yarp/dev/IAudioRender.h>

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

Public Member Functions

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

Detailed Description

Interface for rendering a YARP-format sound and controlling its reproduction ona device.

Definition at line 22 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::sig::AudioBufferSize size)
pure virtual

◆ getPlaybackAudioBufferMaxSize()

virtual bool yarp::dev::IAudioRender::getPlaybackAudioBufferMaxSize ( yarp::sig::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 PortAudioDeviceDriver, and yarp::dev::AudioPlayerDeviceBase.

◆ 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 AudioToFileDevice, PortAudioDeviceDriver, and yarp::dev::AudioPlayerDeviceBase.

◆ 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 AudioToFileDevice, FakeSpeaker, PortAudioDeviceDriver, and PortAudioPlayerDeviceDriver.

◆ 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 PortAudioDeviceDriver, and yarp::dev::AudioPlayerDeviceBase.

◆ startPlayback()

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

Start the playback.

Returns
true/false upon success/failure

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

◆ stopPlayback()

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

Stop the playback.

Returns
true/false upon success/failure

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


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