YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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>
13#include <yarp/sig/Sound.h>
14
15namespace yarp::dev {
16
23{
24public:
29
42 virtual yarp::dev::ReturnValue getSound(yarp::sig::Sound& sound, size_t min_number_of_samples, size_t max_number_of_samples, double max_samples_timeout_s) = 0;
43
50
57
63 virtual yarp::dev::ReturnValue isRecording(bool& recording_enabled) = 0;
64
66
68
70
76 virtual yarp::dev::ReturnValue setSWGain(double gain) = 0;
77
83 virtual yarp::dev::ReturnValue setHWGain(double gain) = 0;
84};
85
86} // namespace yarp::dev
87
88#endif // YARP_DEV_IAUDIOGRABBERSOUND_H
Read a YARP-format sound block from a device.
virtual yarp::dev::ReturnValue getRecordingAudioBufferCurrentSize(yarp::sig::AudioBufferSize &size)=0
virtual yarp::dev::ReturnValue 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 yarp::dev::ReturnValue stopRecording()=0
Stop the recording.
virtual yarp::dev::ReturnValue resetRecordingAudioBuffer()=0
virtual yarp::dev::ReturnValue isRecording(bool &recording_enabled)=0
Check if the recording has been enabled (e.g.
virtual yarp::dev::ReturnValue setHWGain(double gain)=0
Sets the hardware gain of the grabbing device (if supported by the hardware)
virtual yarp::dev::ReturnValue startRecording()=0
Start the recording.
virtual yarp::dev::ReturnValue setSWGain(double gain)=0
Sets a software gain for the grabbed audio.
virtual yarp::dev::ReturnValue getRecordingAudioBufferMaxSize(yarp::sig::AudioBufferSize &size)=0
virtual ~IAudioGrabberSound()
Destructor.
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Definition Sound.h:25
For streams capable of holding different kinds of content, check what they actually have.
#define YARP_dev_API
Definition api.h:18