From cd71055f14b70284d8bd3eb35fadc15b36ba0780 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 13 Feb 2012 21:16:59 +0100 Subject: use PulseAudio instead of QAudioDevice --- fmrxthread.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 fmrxthread.h (limited to 'fmrxthread.h') 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 + +#include + +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 -- cgit v1.2.3