Mercurial > hg > svapp
comparison audioio/AudioPulseAudioTarget.h @ 118:c41e340dfe8d
* timing updates; still much to be done
author | Chris Cannam |
---|---|
date | Wed, 21 May 2008 17:11:57 +0000 |
parents | 2bc8bf6d016c |
children | 1ba557a20ca3 |
comparison
equal
deleted
inserted
replaced
117:2bc8bf6d016c | 118:c41e340dfe8d |
---|---|
20 | 20 |
21 #include <pulse/pulseaudio.h> | 21 #include <pulse/pulseaudio.h> |
22 | 22 |
23 #include <QObject> | 23 #include <QObject> |
24 #include <QMutex> | 24 #include <QMutex> |
25 #include <QThread> | 25 #include "base/Thread.h" |
26 | 26 |
27 #include "AudioCallbackPlayTarget.h" | 27 #include "AudioCallbackPlayTarget.h" |
28 | 28 |
29 class AudioCallbackPlaySource; | 29 class AudioCallbackPlaySource; |
30 | 30 |
54 static void streamStateChangedStatic(pa_stream *, void *); | 54 static void streamStateChangedStatic(pa_stream *, void *); |
55 static void contextStateChangedStatic(pa_context *, void *); | 55 static void contextStateChangedStatic(pa_context *, void *); |
56 | 56 |
57 QMutex m_mutex; | 57 QMutex m_mutex; |
58 | 58 |
59 class MainLoopThread : public QThread | 59 class MainLoopThread : public Thread |
60 { | 60 { |
61 public: | 61 public: |
62 MainLoopThread(pa_mainloop *loop) : m_loop(loop) { } | 62 MainLoopThread(pa_mainloop *loop) : Thread(RTThread), m_loop(loop) { } |
63 virtual void run() { | 63 virtual void run() { |
64 int rv = 0; | 64 int rv = 0; |
65 pa_mainloop_run(m_loop, &rv); //!!! check return value from this, and rv | 65 pa_mainloop_run(m_loop, &rv); //!!! check return value from this, and rv |
66 } | 66 } |
67 | 67 |