YARP
Yet Another Robot Platform
IAudioGrabberSound.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_IAUDIOGRABBERSOUND_H
8 #define YARP_DEV_IAUDIOGRABBERSOUND_H
9 
10 #include <yarp/dev/api.h>
12 #include <yarp/sig/Sound.h>
13 
14 namespace yarp {
15 namespace dev {
16 
23 {
24 public:
29 
42  virtual bool getSound(yarp::sig::Sound& sound, size_t min_number_of_samples, size_t max_number_of_samples, double max_samples_timeout_s) = 0;
43 
49  virtual bool startRecording() = 0;
50 
56  virtual bool stopRecording() = 0;
57 
63  virtual bool isRecording(bool& recording_enabled) = 0;
64 
66 
68 
69  virtual bool resetRecordingAudioBuffer() = 0;
70 
76  virtual bool setSWGain(double gain) = 0;
77 
83  virtual bool setHWGain(double gain) = 0;
84 };
85 
86 } // namespace dev
87 } // namespace yarp
88 
89 #endif // YARP_DEV_IAUDIOGRABBERSOUND_H
Read a YARP-format sound block from a device.
virtual bool getSound(yarp::sig::Sound &sound, size_t min_number_of_samples, size_t max_number_of_samples, double max_samples_timeout_s)=0
Get a sound from a device.
virtual bool resetRecordingAudioBuffer()=0
virtual bool setSWGain(double gain)=0
Sets a software gain for the grabbed audio.
virtual bool getRecordingAudioBufferCurrentSize(yarp::dev::AudioBufferSize &size)=0
virtual bool getRecordingAudioBufferMaxSize(yarp::dev::AudioBufferSize &size)=0
virtual bool stopRecording()=0
Stop the recording.
virtual bool startRecording()=0
Start the recording.
virtual ~IAudioGrabberSound()
Destructor.
virtual bool isRecording(bool &recording_enabled)=0
Check if the recording has been enabled (e.g.
virtual bool setHWGain(double gain)=0
Sets the hardware gain of the grabbing device (if supported by the hardware)
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