mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-18 10:01:57 -05:00
0a67803476
Change source URLs in teh CMake scripts for the kvasd binaries. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3563 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
46 lines
914 B
C++
46 lines
914 B
C++
#ifndef SOUNDIN_H__
|
|
#define SOUNDIN_H__
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QScopedPointer>
|
|
#include <QAudioInput>
|
|
|
|
class QAudioDeviceInfo;
|
|
class QAudioInput;
|
|
class QIODevice;
|
|
|
|
// Gets audio data from sound sample source and passes it to a sink device
|
|
class SoundInput : public QObject
|
|
{
|
|
Q_OBJECT;
|
|
|
|
private:
|
|
Q_DISABLE_COPY (SoundInput);
|
|
|
|
public:
|
|
SoundInput (QObject * parent = 0)
|
|
: QObject (parent)
|
|
{
|
|
}
|
|
|
|
~SoundInput ();
|
|
|
|
private:
|
|
Q_SIGNAL void error (QString message) const;
|
|
Q_SIGNAL void status (QString message) const;
|
|
|
|
// sink must exist from the start call to any following stop () call
|
|
Q_SLOT void start(QAudioDeviceInfo const&, unsigned channels, int framesPerBuffer, QIODevice * sink);
|
|
Q_SLOT void stop();
|
|
|
|
// used internally
|
|
Q_SLOT void handleStateChanged (QAudio::State) const;
|
|
|
|
bool audioError () const;
|
|
|
|
QScopedPointer<QAudioInput> m_stream;
|
|
};
|
|
|
|
#endif
|