VST 3 SDK VST 3.7
SDK for developing VST plug-in
|
Ringbuffer. More...
#include <ringbuffer.h>
Public Member Functions | |
RingBuffer (size_t initialNumberOfItems=0) noexcept | |
Default constructor. | |
size_t | size () const noexcept |
size | |
void | resize (size_t newNumberOfItems) noexcept |
resize | |
bool | push (ItemT &&item) noexcept |
push a new item into the ringbuffer | |
bool | push (const ItemT &item) noexcept |
push a new item into the ringbuffer | |
bool | push (const std::initializer_list< ItemT > &items) noexcept |
push multiple items at once into the ringbuffer | |
bool | pop (ItemT &item) noexcept |
pop an item out of the ringbuffer | |
Ringbuffer.
A ringbuffer supporting one reader and one writer thread
|
inlinenoexcept |
Default constructor.
initialNumberOfItems | initial ring buffer size |
|
inlinenoexcept |
size
|
inlinenoexcept |
resize
note that you have to make sure that no other thread is reading or writing while calling this method
newNumberOfItems | resize buffer |
|
inlinenoexcept |
push a new item into the ringbuffer
item | to push |
|
inlinenoexcept |
push a new item into the ringbuffer
item | to push |
|
inlinenoexcept |
push multiple items at once into the ringbuffer
if there are insufficient free slots in the ring buffer, no item will be pushed. furthermore, it is guaranteed that the newly added items can only be popped from the buffer after all items have been added.
items | list of items to push |
|
inlinenoexcept |
pop an item out of the ringbuffer
item |