aboutsummaryrefslogtreecommitdiffstats
path: root/common/ringbuffer.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-08-21 13:27:14 -0700
committerChris Robinson <[email protected]>2021-08-21 13:27:14 -0700
commit365ff8302ea90312900e95581ccd5087977285da (patch)
tree3a520f96e710c2b7ac30f590a896b8fded02c077 /common/ringbuffer.h
parentb1031459c95486226512ad638195ba087c12c09e (diff)
Add PipeWire capture support
Diffstat (limited to 'common/ringbuffer.h')
-rw-r--r--common/ringbuffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/ringbuffer.h b/common/ringbuffer.h
index fa8fce10..9628505c 100644
--- a/common/ringbuffer.h
+++ b/common/ringbuffer.h
@@ -98,6 +98,8 @@ public:
void writeAdvance(size_t cnt) noexcept
{ mWritePtr.fetch_add(cnt, std::memory_order_acq_rel); }
+ size_t getElemSize() const noexcept { return mElemSize; }
+
/**
* Create a new ringbuffer to hold at least `sz' elements of `elem_sz'
* bytes. The number of elements is rounded up to the next power of two