#include <yarp/dev/AudioRecorderDeviceBase.h>
Public Member Functions | |
virtual bool | getSound (yarp::sig::Sound &sound, size_t min_number_of_samples, size_t max_number_of_samples, double max_samples_timeout_s) override |
Get a sound from a device. More... | |
virtual bool | startRecording () override |
Start the recording. More... | |
virtual bool | stopRecording () override |
Stop the recording. More... | |
virtual bool | getRecordingAudioBufferMaxSize (yarp::dev::AudioBufferSize &size) override |
virtual bool | getRecordingAudioBufferCurrentSize (yarp::dev::AudioBufferSize &size) override |
virtual bool | resetRecordingAudioBuffer () override |
virtual | ~AudioRecorderDeviceBase () |
Public Member Functions inherited from yarp::dev::IAudioGrabberSound | |
virtual | ~IAudioGrabberSound () |
Destructor. More... | |
Protected Attributes | |
bool | m_isRecording = false |
std::mutex | m_mutex |
yarp::dev::CircularAudioBuffer_16t * | m_inputBuffer = nullptr |
AudioDeviceDriverSettings | m_audiorecorder_cfg |
Definition at line 33 of file AudioRecorderDeviceBase.h.
|
virtual |
Definition at line 168 of file AudioRecorderDeviceBase.cpp.
|
overridevirtual |
Implements yarp::dev::IAudioGrabberSound.
Definition at line 129 of file AudioRecorderDeviceBase.cpp.
|
overridevirtual |
Implements yarp::dev::IAudioGrabberSound.
Definition at line 121 of file AudioRecorderDeviceBase.cpp.
|
overridevirtual |
Get a sound from a device.
Examples: getSound(s, 0, 100, 0.1); returns a sound whose size can vary between 0 and 100, with a maximum blocking time of 0.1 getSound(s, 100, 100, 0.0); returns a sound with exact size of 100. It may block forever (more specifically, until sound size is at least 100). getSound(s, 100, 100000, 0.0); returns a sound with a minimum size of 0, while trying to transfer all the internal buffer. It may block forever (more specifically, until sound size is at least 100).
sound | the sound to be filled |
min_number_of_samples. | The function will block until the driver is able to collect at least min_number_of_samples. If set to zero, the function may return empty sounds. |
max_number_of_samples. | The function will block until the driver is either able to collect max_number_of_samples or the timeout expires. |
max_samples_timeout_s. | The timeout (in seconds) to retrieve max_number_of_samples. |
Implements yarp::dev::IAudioGrabberSound.
Definition at line 35 of file AudioRecorderDeviceBase.cpp.
|
overridevirtual |
Implements yarp::dev::IAudioGrabberSound.
Definition at line 137 of file AudioRecorderDeviceBase.cpp.
|
overridevirtual |
Start the recording.
Implements yarp::dev::IAudioGrabberSound.
Reimplemented in PortAudioRecorderDeviceDriver.
Definition at line 145 of file AudioRecorderDeviceBase.cpp.
|
overridevirtual |
Stop the recording.
Implements yarp::dev::IAudioGrabberSound.
Reimplemented in PortAudioRecorderDeviceDriver.
Definition at line 157 of file AudioRecorderDeviceBase.cpp.
|
protected |
Definition at line 40 of file AudioRecorderDeviceBase.h.
|
protected |
Definition at line 38 of file AudioRecorderDeviceBase.h.
|
protected |
Definition at line 36 of file AudioRecorderDeviceBase.h.
|
protected |
Definition at line 37 of file AudioRecorderDeviceBase.h.