19 #ifndef PortAudioDeviceDriverh
20 #define PortAudioDeviceDriverh
27 #include <portaudio.h>
30 #define DEFAULT_SAMPLE_RATE (44100)
31 #define DEFAULT_NUM_CHANNELS (2)
32 #define DEFAULT_DITHER_FLAG (0)
33 #define DEFAULT_FRAMES_PER_BUFFER (512)
71 PaStreamParameters inputParameters;
72 PaStreamParameters outputParameters;
108 bool close()
override;
109 bool getSound(
yarp::sig::Sound& sound,
size_t min_number_of_samples,
size_t max_number_of_samples,
double max_samples_timeout_s)
override;
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 open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool m_getSoundIsNotBlocking
bool stopRecording() override
Stop the recording.
virtual ~PortAudioDeviceDriver()
bool getPlaybackAudioBufferCurrentSize(yarp::dev::AudioBufferSize &size) override
PortAudioDeviceDriverSettings m_driverConfig
bool resetRecordingAudioBuffer() override
bool getPlaybackAudioBufferMaxSize(yarp::dev::AudioBufferSize &size) override
bool startRecording() override
Start the recording.
bool getRecordingAudioBufferCurrentSize(yarp::dev::AudioBufferSize &size) override
bool resetPlaybackAudioBuffer() override
bool renderSound(const yarp::sig::Sound &sound) override
Render a sound using a device (i.e.
bool appendSound(const yarp::sig::Sound &sound)
enum PortAudioDeviceDriver::@90 renderMode
bool close() override
Close the DeviceDriver.
bool stopPlayback() override
Stop the playback.
bool immediateSound(const yarp::sig::Sound &sound)
bool getRecordingAudioBufferMaxSize(yarp::dev::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.
A base class for nested structures that can be searched.
An abstraction for a thread of execution.
Class for storing sounds.