23#include <juce_core/juce_core.h>
24#include <juce_data_structures/juce_data_structures.h>
34 UpdateQueue (
Object& consumer, juce::Thread* thread);
35 virtual ~UpdateQueue () {}
36 UpdateQueue (
const UpdateQueue&) =
delete;
37 UpdateQueue& operator= (
const UpdateQueue&) =
delete;
38 UpdateQueue (UpdateQueue&&) =
delete;
39 UpdateQueue& operator= (UpdateQueue&&) =
delete;
58 void pushUpdate (juce::MemoryBlock&& update);
64 juce::Thread* destThread;
66 juce::CriticalSection mutex;
68 std::deque<juce::MemoryBlock> queue;
81class Sync :
public UpdateQueue,
82 public juce::ValueTreeSynchroniser
97 Sync& operator= (
const Sync&) =
delete;
110 void stateChanged (
const void* encodedChange,
size_t encodedChangeSize)
override;
Definition cello_object.h:34
Sync(Object &producer, Object &consumer, juce::Thread *thread)
Construct a new Sync object.
Definition cello_sync.cpp:81
void performAllUpdates()
Execute each of the updates that are ready.
Definition cello_sync.cpp:38
int getPendingUpdateCount() const
Definition cello_sync.cpp:32
void performNextUpdate()
Pop the next event from the queue and apply the change to the destination value tree.
Definition cello_sync.cpp:44