summaryrefslogtreecommitdiff
path: root/fmrxthread.h
diff options
context:
space:
mode:
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