summaryrefslogtreecommitdiff
path: root/fmrxthread.h
diff options
context:
space:
mode:
authorJavier S. Pedro <javier@javispedro.com>2012-02-13 21:16:59 +0100
committerJavier S. Pedro <javier@javispedro.com>2012-02-13 21:16:59 +0100
commitcd71055f14b70284d8bd3eb35fadc15b36ba0780 (patch)
tree79fe0693f0bb3e031e51cb1657f29927bdebcb38 /fmrxthread.h
parent140d795d27e19dd7ffb3d58a404e601eef8b5f55 (diff)
downloadfmrx-qt-cd71055f14b70284d8bd3eb35fadc15b36ba0780.tar.gz
fmrx-qt-cd71055f14b70284d8bd3eb35fadc15b36ba0780.zip
use PulseAudio instead of QAudioDevice
Diffstat (limited to 'fmrxthread.h')
-rw-r--r--fmrxthread.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/fmrxthread.h b/fmrxthread.h
new file mode 100644
index 0000000..357f4c4
--- /dev/null
+++ b/fmrxthread.h
@@ -0,0 +1,38 @@
+#ifndef FMRXTHREAD_H
+#define FMRXTHREAD_H
+
+#include <QThread>
+
+#include <pulse/pulseaudio.h>
+
+class FmRxThread : public QThread
+{
+ Q_OBJECT
+public:
+ explicit FmRxThread(QObject *parent = 0);
+
+ void setInputFd(int fd);
+ int inputFd() const;
+
+ bool error() const;
+
+ void run();
+ void stop();
+
+signals:
+
+private:
+ bool configure();
+ void deconfigure();
+ bool loop();
+
+private:
+ bool m_quit;
+ bool m_error;
+ int m_fd;
+ pa_mainloop *m_mainloop;
+ pa_context *m_context;
+ pa_stream *m_stream;
+};
+
+#endif // FMRXTHREAD_H