diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
| commit | f647d78463c1250ce9c99af664615fafccf5e959 (patch) | |
| tree | 5b00428cef68aef1c9d407e2d4535687422419b6 /map65/soundin.h | |
| parent | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff) | |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'map65/soundin.h')
| -rw-r--r--[-rwxr-xr-x] | map65/soundin.h | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/map65/soundin.h b/map65/soundin.h index ca4ac81f..78947338 100755..100644 --- a/map65/soundin.h +++ b/map65/soundin.h @@ -1,82 +1,82 @@ -#ifndef SOUNDIN_H
-#define SOUNDIN_H
-
-#include <QtCore>
-#include <QtNetwork/QUdpSocket>
-#include <QDebug>
-#include <valarray>
-
-// Thread gets audio data from soundcard and signals when a buffer of
-// specified size is available.
-class SoundInThread : public QThread
-{
- Q_OBJECT
- bool quitExecution; // if true, thread exits gracefully
- double m_rate; // sample rate
- unsigned bufSize; // user's buffer size
-
-protected:
- virtual void run();
-
-public:
- bool m_dataSinkBusy;
-
- SoundInThread():
- quitExecution(false),
- m_rate(0),
- bufSize(0),
- m_dataSinkBusy(false)
- {
- }
-
- void setSwapIQ(bool b);
- void setScale(qint32 n);
- void setPort(qint32 n);
- void setInputDevice(qint32 n);
- void setRate(double rate);
- void setBufSize(unsigned bufSize);
- void setNetwork(bool b);
- void setMonitoring(bool b);
- void setFadd(double x);
- void setNrx(int n);
- void setForceCenterFreqBool(bool b);
- void setForceCenterFreqMHz(double d);
- void setPeriod(int n);
- int nrx();
- int mhsym();
-
-signals:
- void bufferAvailable(std::valarray<qint16> samples, double rate);
- void readyForFFT(int k);
- void error(const QString& message);
- void status(const QString& message);
-
-public slots:
- void quit();
-
-private:
- void inputUDP();
-
- double m_fAdd;
- bool m_net;
- bool m_monitoring;
- bool m_bForceCenterFreq;
- bool m_IQswap;
- double m_dForceCenterFreq;
- qint32 m_nrx;
- qint32 m_hsym;
- qint32 m_nDevIn;
- qint32 m_udpPort;
- qint32 m_TRperiod;
- qint32 m_TRperiod0;
- qint32 m_dB;
-
- QUdpSocket *udpSocket;
-};
-
-extern "C" {
- void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k, double s1[],
- double s2[], double s3[]);
-}
-
-#endif // SOUNDIN_H
+#ifndef SOUNDIN_H +#define SOUNDIN_H + +#include <QtCore> +#include <QtNetwork/QUdpSocket> +#include <QDebug> +#include <valarray> + +// Thread gets audio data from soundcard and signals when a buffer of +// specified size is available. +class SoundInThread : public QThread +{ + Q_OBJECT + bool quitExecution; // if true, thread exits gracefully + double m_rate; // sample rate + unsigned bufSize; // user's buffer size + +protected: + virtual void run(); + +public: + bool m_dataSinkBusy; + + SoundInThread(): + quitExecution(false), + m_rate(0), + bufSize(0), + m_dataSinkBusy(false) + { + } + + void setSwapIQ(bool b); + void setScale(qint32 n); + void setPort(qint32 n); + void setInputDevice(qint32 n); + void setRate(double rate); + void setBufSize(unsigned bufSize); + void setNetwork(bool b); + void setMonitoring(bool b); + void setFadd(double x); + void setNrx(int n); + void setForceCenterFreqBool(bool b); + void setForceCenterFreqMHz(double d); + void setPeriod(int n); + int nrx(); + int mhsym(); + +signals: + void bufferAvailable(std::valarray<qint16> samples, double rate); + void readyForFFT(int k); + void error(const QString& message); + void status(const QString& message); + +public slots: + void quit(); + +private: + void inputUDP(); + + double m_fAdd; + bool m_net; + bool m_monitoring; + bool m_bForceCenterFreq; + bool m_IQswap; + double m_dForceCenterFreq; + qint32 m_nrx; + qint32 m_hsym; + qint32 m_nDevIn; + qint32 m_udpPort; + qint32 m_TRperiod; + qint32 m_TRperiod0; + qint32 m_dB; + + QUdpSocket *udpSocket; +}; + +extern "C" { + void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k, double s1[], + double s2[], double s3[]); +} + +#endif // SOUNDIN_H |
