Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::ParamEventsOptOutMonitor Class Reference

Records, for one adapter, whether an opted-out processor read param_events(), and logs it once. More...

#include <processor.hpp>

Public Member Functions

 ParamEventsOptOutMonitor ()=default
 ParamEventsOptOutMonitor (const ParamEventsOptOutMonitor &)=delete
ParamEventsOptOutMonitor & operator= (const ParamEventsOptOutMonitor &)=delete
 ~ParamEventsOptOutMonitor ()
void arm (bool opted_out, const state::ParameterEventQueue *queue) noexcept
 Registers queue when the processor opted out; does nothing otherwise.
bool read_while_opted_out () const noexcept
 True once the processor read param_events() while opted out.
bool report (const Processor &processor)
 Logs, once, that processor read param_events() while opted out.

Detailed Description

Records, for one adapter, whether an opted-out processor read param_events(), and logs it once.

The state lives outside Processor so its layout stays fixed: a plug-in built against an earlier header may have placed its own first members in Processor's tail padding, so Processor gains no data members.

The adapter arms it once, on the main thread, with the queue it hands the processor; that registers the queue's address. param_events() looks the address up and marks it, with atomics on static storage only. report() runs off the audio thread when the host deactivates or releases the processor. When every slot near the queue's home is taken, the read is not recorded.

The queue and its monitor are members of the same adapter object, so the queue's storage is released only after the monitor's destructor has cleared the slot: no other queue can take that address while the slot still names it. A caller that owns the two separately must keep the queue alive until the monitor is destroyed or re-armed.

Constructor & Destructor Documentation

◆ ParamEventsOptOutMonitor() [1/2]

pulp::format::ParamEventsOptOutMonitor::ParamEventsOptOutMonitor ( )
default

◆ ParamEventsOptOutMonitor() [2/2]

pulp::format::ParamEventsOptOutMonitor::ParamEventsOptOutMonitor ( const ParamEventsOptOutMonitor & )
delete

◆ ~ParamEventsOptOutMonitor()

pulp::format::ParamEventsOptOutMonitor::~ParamEventsOptOutMonitor ( )
inline

Member Function Documentation

◆ arm()

void pulp::format::ParamEventsOptOutMonitor::arm ( bool opted_out,
const state::ParameterEventQueue * queue )
inlinenoexcept

Registers queue when the processor opted out; does nothing otherwise.

◆ operator=()

ParamEventsOptOutMonitor & pulp::format::ParamEventsOptOutMonitor::operator= ( const ParamEventsOptOutMonitor & )
delete

◆ read_while_opted_out()

bool pulp::format::ParamEventsOptOutMonitor::read_while_opted_out ( ) const
inlinenoexcept

True once the processor read param_events() while opted out.

◆ report()

bool pulp::format::ParamEventsOptOutMonitor::report ( const Processor & processor)

Logs, once, that processor read param_events() while opted out.

Main thread only. Returns true when it logged.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/format/include/pulp/format/processor.hpp