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

kAudioUnitProperty_RenderContextObserver, the v2 form of AUv3's renderContextObserver. More...

#include <au_v2_common.hpp>

Public Member Functions

 RenderContextObserverProperty ()=default
 ~RenderContextObserverProperty ()
 RenderContextObserverProperty (const RenderContextObserverProperty &)=delete
RenderContextObserverProperty & operator= (const RenderContextObserverProperty &)=delete
void bind (Processor *processor)
 Bind the processor (call once it exists, before the host can query).
OSStatus property_info (AudioUnitScope scope, AudioUnitElement element, UInt32 &out_size, bool &out_writable) const
OSStatus get (AudioUnitScope scope, AudioUnitElement element, void *out_data) const
void prepare_for_render () const noexcept
 Render entry guard: idempotent, realtime safe.
void clear_after_render_resources () const noexcept
 Off the render thread, when render resources go away (Cleanup): publish removal and wait until every worker has left the borrowed workgroup.
AudioWorkgroupClient * client () const noexcept

Detailed Description

kAudioUnitProperty_RenderContextObserver, the v2 form of AUv3's renderContextObserver.

A processor that runs auxiliary realtime threads implements AudioWorkgroupClient; the OS then calls the returned block on the render thread, before each render whose workgroup changed, with the host's AudioUnitRenderContext. The block forwards the context's workgroup to the client and completes the client's join barrier before returning, exactly as the AUv3 adapter does. The host-owned workgroup is borrowed, never retained: Apple documents no reference-count operation as realtime safe, and the context protocol bounds its lifetime.

Advertised only for a processor that implements AudioWorkgroupClient; any other processor reports kAudioUnitErr_InvalidProperty, which a host reads as "no auxiliary realtime threads". The block is created once and owned here; GetProperty hands out that pointer without transferring ownership.

Constructor & Destructor Documentation

◆ RenderContextObserverProperty() [1/2]

pulp::format::au::RenderContextObserverProperty::RenderContextObserverProperty ( )
default

◆ ~RenderContextObserverProperty()

pulp::format::au::RenderContextObserverProperty::~RenderContextObserverProperty ( )

◆ RenderContextObserverProperty() [2/2]

pulp::format::au::RenderContextObserverProperty::RenderContextObserverProperty ( const RenderContextObserverProperty & )
delete

Member Function Documentation

◆ bind()

void pulp::format::au::RenderContextObserverProperty::bind ( Processor * processor)

Bind the processor (call once it exists, before the host can query).

A processor that is not an AudioWorkgroupClient leaves the property unadvertised.

◆ clear_after_render_resources()

void pulp::format::au::RenderContextObserverProperty::clear_after_render_resources ( ) const
noexcept

Off the render thread, when render resources go away (Cleanup): publish removal and wait until every worker has left the borrowed workgroup.

◆ client()

AudioWorkgroupClient * pulp::format::au::RenderContextObserverProperty::client ( ) const
inlinenoexcept

◆ get()

OSStatus pulp::format::au::RenderContextObserverProperty::get ( AudioUnitScope scope,
AudioUnitElement element,
void * out_data ) const

◆ operator=()

RenderContextObserverProperty & pulp::format::au::RenderContextObserverProperty::operator= ( const RenderContextObserverProperty & )
delete

◆ prepare_for_render()

void pulp::format::au::RenderContextObserverProperty::prepare_for_render ( ) const
noexcept

Render entry guard: idempotent, realtime safe.

Every render verifies the current publication before doing anything else.

◆ property_info()

OSStatus pulp::format::au::RenderContextObserverProperty::property_info ( AudioUnitScope scope,
AudioUnitElement element,
UInt32 & out_size,
bool & out_writable ) const

The documentation for this class was generated from the following file: