YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
PortAudioRecorderDeviceDriver.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#ifndef PortAudioRecorderDeviceDriverh
7#define PortAudioRecorderDeviceDriverh
8
10#include <yarp/os/Thread.h>
11
15#include <portaudio.h>
16
18
35 public yarp::os::Thread,
37{
38private:
39 PaStreamParameters m_inputParameters;
40 PaStream* m_stream;
41 PaError m_err;
42
43public:
50
51public: //DeviceDriver
52 bool open(yarp::os::Searchable& config) override;
53 bool close() override;
54
55public: //AudioRecorderDeviceBase(IAudioGrabberSound)
58 yarp::dev::ReturnValue setHWGain(double gain) override;
59
60public: //Thread
61 void threadRelease() override;
62 bool threadInit() override;
63 void run() override;
64
65protected:
67 void handleError();
68};
69
70#endif
This class is the parameters parser for class PortAudioRecorderDeviceDriver.
portaudioRecorder: A device driver for an audio source wrapped by PortAudio library.
yarp::dev::ReturnValue setHWGain(double gain) override
Sets the hardware gain of the grabbing device (if supported by the hardware)
PortAudioRecorderDeviceDriver(const PortAudioRecorderDeviceDriver &)=delete
void run() override
Main body of the new thread.
bool threadInit() override
Initialization method.
yarp::dev::ReturnValue stopRecording() override
Stop the recording.
PortAudioRecorderDeviceDriver & operator=(PortAudioRecorderDeviceDriver &&)=delete
void threadRelease() override
Release method.
PortAudioRecorderDeviceDriver & operator=(const PortAudioRecorderDeviceDriver &)=delete
PortAudioRecorderDeviceDriver(PortAudioRecorderDeviceDriver &&)=delete
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue startRecording() override
Start the recording.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
AudioRecorderDeviceBase : a base class for all audio recorder devices
Interface implemented by all device drivers.
A base class for nested structures that can be searched.
Definition Searchable.h:31
An abstraction for a thread of execution.
Definition Thread.h:21