Loading...
Searching...
No Matches
Ui::Loudness::LoudnessMonitor Struct Referencefinal
Inheritance diagram for Ui::Loudness::LoudnessMonitor:
Detailed Description
Besides the readings, the monitor recycles measurement states, as libebur128 has no reset: a reset swaps in a spare state and retires the used one, and recycle(), which the node's worker runs off the execution thread whether or not the process is shown, destroys the retired states and builds new spares. The execution thread never allocates nor frees.
Public Member Functions | |
| void | recycle () |
| int | freeRetiredSlot () const noexcept |
| ebur128_state * | takeSpare (unsigned long samplerate) noexcept |
Public Member Functions inherited from Process::Monitor | |
| Monitor (const Monitor &)=delete | |
| Monitor & | operator= (const Monitor &)=delete |
| bool | watched () const noexcept |
Public Attributes | |
| Process::LatestValue< Readings > | readings |
| std::atomic_bool | reset {} |
| std::array< std::atomic< ebur128_state * >, slots > | spare {} |
| std::array< std::atomic< ebur128_state * >, slots > | retired {} |
| std::atomic< double > | rate {48000.} |
| The rate spares are built for. | |
| std::atomic_bool | recycling {} |
| Set when a recycle() is requested, cleared once it is done. | |
Public Attributes inherited from Process::Monitor | |
| std::atomic< int > | viewers {0} |
Static Public Attributes | |
| static constexpr int | slots = 2 |
Member Function Documentation
◆ freeRetiredSlot()
|
inlinenoexcept |
Execution thread, the only one to fill retired slots: one that is empty and stays so until it fills it, or -1.
◆ recycle()
|
inline |
Not on the execution thread: destroys the retired states and fills the empty spare slots.
◆ takeSpare()
|
inlinenoexcept |
Execution thread: a spare state for samplerate, or null when none is ready. A spare built for another rate is retired on the way, while there is room for it.
The documentation for this struct was generated from the following file:
Public Member Functions inherited from