YARP
Yet Another Robot Platform
IAudioRender.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_DEV_IAUDIORENDER_H
8 #define YARP_DEV_IAUDIORENDER_H
9 
10 #include <yarp/sig/Sound.h>
11 #include <yarp/dev/api.h>
13 
14 namespace yarp {
15 namespace dev {
16 
18 {
19 public:
23  virtual ~IAudioRender();
24 
31  virtual bool renderSound(const yarp::sig::Sound& sound) = 0;
32 
38  virtual bool startPlayback() = 0;
39 
45  virtual bool stopPlayback() = 0;
46 
52  virtual bool isPlaying(bool& playback_enabled) = 0;
53 
55 
57 
58  virtual bool resetPlaybackAudioBuffer() = 0;
59 
65  virtual bool setSWGain(double gain) = 0;
66 
72  virtual bool setHWGain(double gain) = 0;
73 };
74 
75 } // namespace dev
76 } // namespace yarp
77 
78 #endif // YARP_DEV_IAUDIORENDER_H
virtual ~IAudioRender()
Destructor.
virtual bool isPlaying(bool &playback_enabled)=0
Check if the playback has been enabled (e.g.
virtual bool renderSound(const yarp::sig::Sound &sound)=0
Render a sound using a device (i.e.
virtual bool resetPlaybackAudioBuffer()=0
virtual bool getPlaybackAudioBufferCurrentSize(yarp::dev::AudioBufferSize &size)=0
virtual bool startPlayback()=0
Start the playback.
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)
virtual bool stopPlayback()=0
Stop the playback.
virtual bool getPlaybackAudioBufferMaxSize(yarp::dev::AudioBufferSize &size)=0
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Definition: Sound.h:26
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18