diff options
| author | Christoph Berg <myon@debian.org> | 2021-09-09 22:49:00 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-09-09 22:49:00 +0200 |
| commit | 85895feeaf88bcde26bbfc71e8f6b2047c0f5f41 (patch) | |
| tree | 79807e00771e4af4ce279e368262f2222806102f /map65/soundout.h | |
| parent | 2f095a04ed69d9aa14b47dc4acde6b3225b2d65e (diff) | |
New upstream version 2.5.0~rc6+repackupstream/2.5.0_rc6+repack
Diffstat (limited to 'map65/soundout.h')
| -rw-r--r-- | map65/soundout.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/map65/soundout.h b/map65/soundout.h new file mode 100644 index 00000000..294c6fa5 --- /dev/null +++ b/map65/soundout.h @@ -0,0 +1,44 @@ +#ifndef SOUNDOUT_H +#define SOUNDOUT_H +#include <QtCore> +#include <QDebug> + +// An instance of this thread sends audio data to a specified soundcard. +// Output can be muted while underway, preserving waveform timing when +// transmission is resumed. + +class SoundOutThread : public QThread +{ + Q_OBJECT + +protected: + virtual void run(); + +public: +// Constructs (but does not start) a SoundOutThread + SoundOutThread() + : quitExecution(false) // Initialize some private members + , m_rate(0) + , m_nwave(48*11025) + , m_txOK(false) + , m_txMute(false) + { + } + +public: + void setOutputDevice(qint32 n); + void setPeriod(int n); + bool quitExecution; //If true, thread exits gracefully + + +// Private members +private: + double m_rate; //Sample rate + qint32 m_nDevOut; //Output device number + qint32 m_nwave; //Length of wave file + qint32 m_TRperiod; //T/R period (30 or 60 s) + bool m_txOK; //Enable Tx audio + bool m_txMute; //Mute temporarily +}; + +#endif |
