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>
12#include <yarp/sig/Sound.h>
13
14namespace yarp::dev {
15
22{
23public:
28
41 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;
42
48 virtual bool startRecording() = 0;
49
55 virtual bool stopRecording() = 0;
56
62 virtual bool isRecording(bool& recording_enabled) = 0;
63
65
67
68 virtual bool resetRecordingAudioBuffer() = 0;
69
75 virtual bool setSWGain(double gain) = 0;
76
82 virtual bool setHWGain(double gain) = 0;
83};
84
85} // namespace yarp::dev
86
87#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::sig::AudioBufferSize &size)=0
virtual bool getRecordingAudioBufferMaxSize(yarp::sig::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:25
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
#define YARP_dev_API
Definition api.h:18