|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
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)
78 PaStreamParameters inputParameters;
79 PaStreamParameters outputParameters;
115 bool close()
override;
116 bool getSound(
yarp::sig::Sound& sound,
size_t min_number_of_samples,
size_t max_number_of_samples,
double max_samples_timeout_s)
override;
void run() override
Main body of the new thread.
bool stopPlayback() override
Stop the playback.
bool startPlayback() override
Start the playback.
A base class for nested structures that can be searched.
bool m_getSoundIsNotBlocking
bool resetRecordingAudioBuffer() override
PortAudioDeviceDriverSettings m_driverConfig
size_t m_numRecordChannels
virtual ~PortAudioDeviceDriver()
An abstraction for a thread of execution.
bool startRecording() override
Start the recording.
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 stopRecording() override
Stop the recording.
Read a YARP-format sound block from a device.
bool getPlaybackAudioBufferMaxSize(yarp::dev::AudioBufferSize &size) override
bool getRecordingAudioBufferCurrentSize(yarp::dev::AudioBufferSize &size) override
bool close() override
Close the DeviceDriver.
bool resetPlaybackAudioBuffer() override
portaudio: Documentation to be added
bool getPlaybackAudioBufferCurrentSize(yarp::dev::AudioBufferSize &size) override
bool renderSound(const yarp::sig::Sound &sound) override
Render a sound using a device (i.e.
bool immediateSound(const yarp::sig::Sound &sound)
size_t m_numPlaybackChannels
Interface implemented by deprecated device drivers.
Class for storing sounds.
bool appendSound(const yarp::sig::Sound &sound)
enum PortAudioDeviceDriver::@0 renderMode
bool getRecordingAudioBufferMaxSize(yarp::dev::AudioBufferSize &size) override
void threadRelease() override
Release method.
bool threadInit() override
Initialization method.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.