Records, for one adapter, whether an opted-out processor read param_events(), and logs it once.
More...
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.