WSJT-X/soundin.h
Joe Taylor 1866a937e4 Continuing to work on SoundIn, SoundOut...
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2483 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-04 16:27:57 +00:00

53 lines
894 B
C++

#ifndef SOUNDIN_H
#define SOUNDIN_H
#include <QtCore>
#include <QDebug>
// 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
protected:
virtual void run();
public:
bool m_dataSinkBusy;
SoundInThread():
quitExecution(false),
m_dataSinkBusy(false)
{
}
void setInputDevice(qint32 n);
void setMonitoring(bool b);
int mstep();
signals:
void readyForFFT(int k);
void error(const QString& message);
void status(const QString& message);
public slots:
void quit();
private:
bool m_monitoring;
qint32 m_step;
qint32 m_nDevIn;
};
extern "C" {
void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k, double s1[],
double s2[], double s3[]);
}
#endif // SOUNDIN_H