6#ifndef PortAudioDeviceDriverh
7#define PortAudioDeviceDriverh
17#define DEFAULT_SAMPLE_RATE (44100)
18#define DEFAULT_NUM_CHANNELS (2)
19#define DEFAULT_DITHER_FLAG (0)
20#define DEFAULT_FRAMES_PER_BUFFER (512)
66 PaStreamParameters inputParameters;
67 PaStreamParameters outputParameters;
103 bool close()
override;
104 bool getSound(
yarp::sig::Sound& sound,
size_t min_number_of_samples,
size_t max_number_of_samples,
double max_samples_timeout_s)
override;
110 bool isPlaying(
bool& playback_enabled)
override;
111 bool isRecording(
bool& recording_enabled)
override;
portaudio deprecated: This device driver has been deprecated! Please use PortAudioPlayerDeviceDriver ...
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.
bool startPlayback() override
Start the playback.
size_t m_numPlaybackChannels
bool setSWGain(double gain) override
Sets a software gain for the grabbed audio.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool m_getSoundIsNotBlocking
bool stopRecording() override
Stop the recording.
virtual ~PortAudioDeviceDriver()
bool isPlaying(bool &playback_enabled) override
Check if the playback has been enabled (e.g.
PortAudioDeviceDriverSettings m_driverConfig
bool resetRecordingAudioBuffer() override
bool setHWGain(double gain) override
Sets the hardware gain of the grabbing device (if supported by the hardware)
bool startRecording() override
Start the recording.
bool resetPlaybackAudioBuffer() override
bool renderSound(const yarp::sig::Sound &sound) override
Render a sound using a device (i.e.
bool isRecording(bool &recording_enabled) override
Check if the recording has been enabled (e.g.
bool appendSound(const yarp::sig::Sound &sound)
bool getPlaybackAudioBufferMaxSize(yarp::sig::AudioBufferSize &size) override
enum PortAudioDeviceDriver::@90 renderMode
bool close() override
Close the DeviceDriver.
bool stopPlayback() override
Stop the playback.
bool getPlaybackAudioBufferCurrentSize(yarp::sig::AudioBufferSize &size) override
bool getRecordingAudioBufferMaxSize(yarp::sig::AudioBufferSize &size) override
bool immediateSound(const yarp::sig::Sound &sound)
bool getRecordingAudioBufferCurrentSize(yarp::sig::AudioBufferSize &size) override
size_t m_numRecordChannels
void run() override
Main body of the new thread.
bool threadInit() override
Initialization method.
void threadRelease() override
Release method.
Interface implemented by deprecated device drivers.
Read a YARP-format sound block from a device.
Interface for rendering a YARP-format sound and controlling its reproduction ona device.
A base class for nested structures that can be searched.
An abstraction for a thread of execution.
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.