YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeMicrophone.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
9#include <yarp/sig/Sound.h>
10#include <yarp/sig/SoundFile.h>
11
12#include <string>
13#include <mutex>
14
16
35{
36public:
42 virtual ~FakeMicrophone() override;
43
44public:
45 yarp::dev::ReturnValue setHWGain(double gain) override;
46
47public: // DeviceDriver
48 bool open(yarp::os::Searchable &config) override;
49 bool close() override;
50
51private:
52 //thread
53 bool threadInit() override;
54 void run() override;
55
56private:
57 std::vector<size_t> m_counter;
58 std::vector<size_t> m_max_count;
59
60 enum waveform_t
61 {
62 sine = 0,
63 sawtooth = 1,
64 square = 2,
65 constant = 3
66 } m_waveform_enum = sine;
67};
This class is the parameters parser for class FakeMicrophone.
fakeMicrophone : fake microphone device implementing the IAudioGrabberSound interface to generate a t...
yarp::dev::ReturnValue setHWGain(double gain) override
Sets the hardware gain of the grabbing device (if supported by the hardware)
virtual ~FakeMicrophone() override
FakeMicrophone(const FakeMicrophone &)=delete
FakeMicrophone & operator=(FakeMicrophone &&)=delete
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool close() override
Close the DeviceDriver.
FakeMicrophone(FakeMicrophone &&)=delete
FakeMicrophone & operator=(const FakeMicrophone &)=delete
AudioRecorderDeviceBase : a base class for all audio recorder devices
Interface implemented by all device drivers.
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
Definition Searchable.h:31