Read a YARP-format sound block from a device. More...
#include <yarp/dev/IAudioGrabberSound.h>
Public Member Functions | |
virtual | ~IAudioGrabberSound () |
Destructor. | |
virtual yarp::dev::ReturnValue | 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 yarp::dev::ReturnValue | startRecording ()=0 |
Start the recording. | |
virtual yarp::dev::ReturnValue | stopRecording ()=0 |
Stop the recording. | |
virtual yarp::dev::ReturnValue | isRecording (bool &recording_enabled)=0 |
Check if the recording has been enabled (e.g. | |
virtual yarp::dev::ReturnValue | getRecordingAudioBufferMaxSize (yarp::sig::AudioBufferSize &size)=0 |
virtual yarp::dev::ReturnValue | getRecordingAudioBufferCurrentSize (yarp::sig::AudioBufferSize &size)=0 |
virtual yarp::dev::ReturnValue | resetRecordingAudioBuffer ()=0 |
virtual yarp::dev::ReturnValue | setSWGain (double gain)=0 |
Sets a software gain for the grabbed audio. | |
virtual yarp::dev::ReturnValue | setHWGain (double gain)=0 |
Sets the hardware gain of the grabbing device (if supported by the hardware) | |
Read a YARP-format sound block from a device.
Definition at line 22 of file IAudioGrabberSound.h.
|
virtualdefault |
Destructor.
|
pure virtual |
Implemented in FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.
|
pure virtual |
Implemented in FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.
|
pure virtual |
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. |
Implemented in FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.
|
pure virtual |
Check if the recording has been enabled (e.g.
via startRecording()/stopRecording())
recording_enabled | the status of the device |
Implemented in FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.
|
pure virtual |
Implemented in FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.
|
pure virtual |
Sets the hardware gain of the grabbing device (if supported by the hardware)
gain | the audio gain (1.0 is the default value) |
Implemented in AudioFromFileDevice, FakeMicrophone, FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, and PortAudioRecorderDeviceDriver.
|
pure virtual |
Sets a software gain for the grabbed audio.
gain | the audio gain (1.0 is the default value) |
Implemented in FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.
|
pure virtual |
Start the recording.
Implemented in FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, PortAudioRecorderDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.
|
pure virtual |
Stop the recording.
Implemented in AudioFromFileDevice, FfmpegGrabber, AudioRecorder_nwc_yarp, PortAudioDeviceDriver, PortAudioRecorderDeviceDriver, and yarp::dev::AudioRecorderDeviceBase.