YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
AudioFromFileDevice.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2023 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>
12
13#include <string>
14#include <mutex>
15#include <vector>
16#include <functional>
17
36{
37public:
43 ~AudioFromFileDevice() override;
44
45 // Device Driver interface
46 bool open(yarp::os::Searchable &config) override;
47 bool close() override;
48
49private:
50 //thread
51 bool threadInit() override;
52 void run() override;
53
54public:
55 yarp::dev::ReturnValue setHWGain(double gain) override;
57
58private:
59 yarp::sig::Sound m_audioFile;
60 size_t m_bpnt = 0;
61 std::vector<std::reference_wrapper<yarp::sig::Sound::audio_sample>> m_datap;
62};
This class is the parameters parser for class AudioFromFileDevice.
audioFromFileDevice : This device driver, wrapped by default by AudioRecorderWrapper,...
yarp::dev::ReturnValue setHWGain(double gain) override
Sets the hardware gain of the grabbing device (if supported by the hardware)
AudioFromFileDevice(AudioFromFileDevice &&)=delete
AudioFromFileDevice(const AudioFromFileDevice &)=delete
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool close() override
Close the DeviceDriver.
AudioFromFileDevice & operator=(AudioFromFileDevice &&)=delete
yarp::dev::ReturnValue stopRecording() override
Stop the recording.
AudioFromFileDevice & operator=(const AudioFromFileDevice &)=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
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Definition Sound.h:25