substantive change: use the JACK wait API and provide "thread buffers" separately...
[ardour.git] / libs / ardour / ardour / buffer_manager.h
1 #ifndef __libardour_buffer_manager__ 
2 #define __libardour_buffer_manager__
3
4 #include <stdint.h>
5
6 #include "pbd/ringbufferNPT.h"
7
8 #include "ardour/chan_count.h"
9
10 namespace ARDOUR {
11
12 class ThreadBuffers;
13
14 class BufferManager
15 {
16   public:
17         static void init (uint32_t);
18         
19         static ThreadBuffers* get_thread_buffers ();
20         static void           put_thread_buffers (ThreadBuffers*);
21
22         static void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
23
24   private:
25         typedef RingBufferNPT<ThreadBuffers*> ThreadBufferFIFO;
26         static ThreadBufferFIFO* thread_buffers;
27 };
28
29 }
30
31 #endif /* __libardour_buffer_manager__ */