45#include <QAudioDevice>
102 const QAudioDevice & dev,
103 float initVolume = 0.0f,
104 QObject * parent =
nullptr);
157 const QAudioDevice & dev,
158 float initGain = 0.0f,
159 QObject * parent =
nullptr);
201 QObject * parent =
nullptr);
void setGain(float g)
Set capture gain (thread-safe).
std::atomic< bool > stop_flag
AudioInThread(const std::string &sockPath, const QAudioDevice &dev, float initGain=0.0f, QObject *parent=nullptr)
void stopAudio()
Stop the thread cleanly.
std::atomic< float > pending_gain
AudioOutThread(const std::string &sockPath, const QAudioDevice &dev, float initVolume=0.0f, QObject *parent=nullptr)
std::atomic< double > last_rms
std::atomic< bool > stop_flag
double getRMS() const
Return the RMS of samples received in the last completed second.
void setVolume(float v)
Set playback volume (thread-safe).
void stopAudio()
Stop the thread cleanly.
std::atomic< float > pending_volume
std::atomic< bool > stop_flag
AudioToneThread(const QAudioDevice &dev, QObject *parent=nullptr)
void stopAudio()
Stop the thread cleanly.
QAudioDevice findOutputDevice(const std::string &name)
Find an audio output device by name.
QAudioDevice findInputDevice(const std::string &name)
Find an audio input device by name.
void listAudioDevices()
Print all available audio input and output devices to stdout.