diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-02-11 23:09:45 +0300 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-02-11 23:09:45 +0300 |
commit | 1c4c833c86b38de435f9ed359e1719ed3b6a1f59 (patch) | |
tree | 723d44e356002f356491fdc6a71659111c1fb364 /intern/audaspace/jack/AUD_JackDevice.h | |
parent | 611a5595f978050d4db057ba3e1046e982c18803 (diff) |
2.5 Audio: The jack backend is now realtime capable and will not produce so much xruns anymore. :-)
Diffstat (limited to 'intern/audaspace/jack/AUD_JackDevice.h')
-rw-r--r-- | intern/audaspace/jack/AUD_JackDevice.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/intern/audaspace/jack/AUD_JackDevice.h b/intern/audaspace/jack/AUD_JackDevice.h index 5a073a69432..96388e1ee50 100644 --- a/intern/audaspace/jack/AUD_JackDevice.h +++ b/intern/audaspace/jack/AUD_JackDevice.h @@ -31,6 +31,7 @@ class AUD_Buffer; #include <jack.h> +#include <ringbuffer.h> /** * This device plays back through Jack. @@ -53,6 +54,8 @@ private: */ AUD_Buffer* m_buffer; + AUD_Buffer* m_deinterleavebuf; + /** * Whether the device is valid. */ @@ -72,6 +75,21 @@ private: */ static int jack_mix(jack_nframes_t length, void *data); + static void* runThread(void* device); + + void updateRingBuffers(); + + jack_ringbuffer_t** m_ringbuffers; + + /** + * The streaming thread. + */ + pthread_t m_thread; + + pthread_mutex_t m_lock; + + pthread_cond_t m_condition; + protected: virtual void playing(bool playing); @@ -81,7 +99,7 @@ public: * \param specs The wanted audio specification, where only the channel count is important. * \exception AUD_Exception Thrown if the audio device cannot be opened. */ - AUD_JackDevice(AUD_DeviceSpecs specs); + AUD_JackDevice(AUD_DeviceSpecs specs, int buffersize = AUD_DEFAULT_BUFFER_SIZE); /** * Closes the Jack client. |