mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-09-08 22:36:40 -04:00
Compute samfac values; put them into "lab5" (for K1JT only). Ransomize the rand() seed on SoundOutThread startup. Increase the DT search range. (This still needs optimization.) git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2724 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
#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_txOK(false)
|
|
, m_txMute(false)
|
|
{
|
|
}
|
|
|
|
public:
|
|
void setOutputDevice(qint32 n);
|
|
void setPeriod(int ntrperiod, int nsps);
|
|
void setTxFreq(int n);
|
|
void setTxSNR(double snr);
|
|
double samFacOut();
|
|
bool quitExecution; //If true, thread exits gracefully
|
|
|
|
// Private members
|
|
private:
|
|
double m_txsnrdb; //if < 0, add noise to Tx audio
|
|
double m_SamFacOut; //(Output sample rate)/48000.0
|
|
qint32 m_nDevOut; //Output device number
|
|
qint32 m_TRperiod; //T/R period (s)
|
|
qint32 m_nsps; //Samples per symbol (at 12000 Hz)
|
|
qint32 m_txFreq;
|
|
bool m_txOK; //Enable Tx audio
|
|
bool m_txMute; //Mute temporarily
|
|
};
|
|
|
|
#endif
|