Read access to the values and meters a processor publishes for its UI. More...
#include <editor_host.hpp>
Public Member Functions | |
| virtual | ~VisualPort ()=default |
| virtual std::size_t | channel_count () const noexcept=0 |
| virtual VisualChannelInfo | channel (std::size_t index) const noexcept=0 |
| Description of channel index (< channel_count()). | |
| virtual bool | read_scalar (std::size_t index, float &value) noexcept=0 |
| Latest value of a scalar channel. | |
| virtual std::size_t | read_meter (std::size_t index, std::span< float > rms, std::span< float > peak) noexcept=0 |
| Latest frame of a meter channel into rms and peak. | |
| virtual std::size_t | read_vector (std::size_t index, std::span< float > samples) noexcept=0 |
| Latest block of a vector channel into samples. | |
| virtual std::size_t | read_events (std::size_t index, std::span< VisualEvent > events) noexcept=0 |
| Occurrences of the latest published block of an events channel. | |
| virtual std::uint32_t | publish_count (std::size_t index) const noexcept=0 |
| Monotonic publish count of channel index. | |
| std::optional< std::size_t > | find (std::string_view name, VisualChannelShape shape) const noexcept |
| Index of the channel called name with shape shape, or nullopt. | |
Read access to the values and meters a processor publishes for its UI.
The audio thread publishes, lock-free; this port reads the latest value of each channel. Every channel is latest-wins: a reader that falls behind sees the newest publish, not a history. Reads are lock-free and allocation-free.
One reader thread: all reads through one VisualPort happen on the same thread (normally the editor's frame tick). The channel set is fixed before audio runs, so an index resolved once stays valid.
|
virtualdefault |
|
pure virtualnoexcept |
Description of channel index (< channel_count()).
Implemented in pulp::format::ValueChannelVisualPort.
|
pure virtualnoexcept |
Implemented in pulp::format::ValueChannelVisualPort.
|
inlinenoexcept |
Index of the channel called name with shape shape, or nullopt.
|
pure virtualnoexcept |
Monotonic publish count of channel index.
A reader compares it across ticks to tell "the writer stopped" from "the value held steady".
Implemented in pulp::format::ValueChannelVisualPort.
|
pure virtualnoexcept |
Occurrences of the latest published block of an events channel.
Returns the number written, or 0 if index is not an events channel.
Implemented in pulp::format::ValueChannelVisualPort.
|
pure virtualnoexcept |
Latest frame of a meter channel into rms and peak.
Returns the number of audio channels the frame carries (possibly more than the spans hold, which are filled up to their size), or 0 if index is not a meter channel.
Implemented in pulp::format::ValueChannelVisualPort.
|
pure virtualnoexcept |
Latest value of a scalar channel.
False if index is not a scalar channel or nothing has been published yet.
Implemented in pulp::format::ValueChannelVisualPort.
|
pure virtualnoexcept |
Latest block of a vector channel into samples.
Returns the number of samples written, or 0 if index is not a vector channel.
Implemented in pulp::format::ValueChannelVisualPort.