Lock-free event channel: the writer publishes the occurrences from one audio block and the view reads the latest completed block. More...
#include <value_source.hpp>
Public Member Functions | |
| ~EventSource () | |
| void | publish (const ValueEvent *events, int count) |
| Publish a block's occurrences from the writer thread. | |
| EventFrame | read () |
| Read the latest completed block from the reader thread. | |
| void | note_publish () noexcept |
| Writer (audio/host) thread, from publish(). | |
| std::uint32_t | publish_seq () const noexcept |
| Reader (UI) thread. Changes iff the writer published since the last read. | |
Friends | |
| class | ValueChannelSet |
Lock-free event channel: the writer publishes the occurrences from one audio block and the view reads the latest completed block.
Like the other visualization channels this is latest-wins, not a lossless queue. A UI that misses an intermediate block observes the newest one.
|
inlinenoexceptinherited |
Writer (audio/host) thread, from publish().
Relaxed: the counter orders no other memory, it only has to be monotonic and eventually visible.
| void pulp::dataplane::EventSource::publish | ( | const ValueEvent * | events, |
| int | count ) |
Publish a block's occurrences from the writer thread.
Alloc-free and non-blocking. Oversized lists are truncated to their leading events.
|
inlinenoexceptinherited |
Reader (UI) thread. Changes iff the writer published since the last read.
Read the latest completed block from the reader thread.
|
friend |