Re: [tim-janik/beast] Jack driver new api (#128)

@swesterfeld commented on this pull request.

In bse/

> + *
+ * Implementation: the synchronization between the two threads is only
+ * implemented by two index variables (read_frame_pos and write_frame_pos)
+ * for which atomic integer reads and writes are required. Since the
+ * producer thread only modifies the write_frame_pos and the consumer thread
+ * only modifies the read_frame_pos, no compare-and-swap or similar
+ * operations are needed to avoid concurrent writes.
+ */
+template<class T>
+class FrameRingBuffer {
+  //BIRNET_PRIVATE_COPY (FrameRingBuffer);
+  vector<vector<T> >  channel_buffer_;
+  std::atomic<int>    atomic_read_frame_pos_;
+  std::atomic<int>    atomic_write_frame_pos_;
+  uint                channel_buffer_size_;       // = n_frames + 1; the extra frame allows us to

Of course. Fixed. Seems the jack driver predates C++11.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]