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

Host offline-render intent for an AU v2 instance. More...

#include <au_v2_common.hpp>

Public Member Functions

OSStatus property_info (AudioUnitScope scope, UInt32 &out_size, bool &out_writable) const noexcept
OSStatus get (AudioUnitScope scope, void *out_data) const noexcept
OSStatus set (AudioUnitScope scope, const void *in_data, UInt32 in_size) noexcept
void begin_session () noexcept
 Start a render session (call from Initialize()).
bool offline () const noexcept
 Render-thread read of the latest host value.

Detailed Description

Host offline-render intent for an AU v2 instance.

kAudioUnitProperty_OfflineRender is a global-scope, read/write UInt32 that a host (Logic's offline bounce, REAPER's render) sets non-zero before a faster-than-realtime render and back to zero afterwards. AUBase does not implement it, so without this an AU v2 plug-in rejects the write and every block reports realtime. The value is written on the host's property thread and read on the render thread, so it is held in an atomic.

The flag is scoped to one render session. Not every host writes it back after a bounce, and a processor that waits for worker results on offline blocks would then wait on every later realtime block. So each adapter calls begin_session() from Initialize(): a host write made since the previous Initialize() survives it (a host may set the flag and then re-initialize for the bounce, or set it before the first Initialize()), and an older write belongs to a previous session and is cleared. Reset() does not clear it, because hosts reset at transport start, which can follow the write that set up the bounce.

Member Function Documentation

◆ begin_session()

void pulp::format::au::OfflineRenderProperty::begin_session ( )
inlinenoexcept

Start a render session (call from Initialize()).

Keeps a value the host wrote since the previous session started; otherwise returns the flag to realtime, so a bounce the host never cleared cannot leak into the next session.

◆ get()

OSStatus pulp::format::au::OfflineRenderProperty::get ( AudioUnitScope scope,
void * out_data ) const
inlinenoexcept

◆ offline()

bool pulp::format::au::OfflineRenderProperty::offline ( ) const
inlinenoexcept

Render-thread read of the latest host value.

◆ property_info()

OSStatus pulp::format::au::OfflineRenderProperty::property_info ( AudioUnitScope scope,
UInt32 & out_size,
bool & out_writable ) const
inlinenoexcept

◆ set()

OSStatus pulp::format::au::OfflineRenderProperty::set ( AudioUnitScope scope,
const void * in_data,
UInt32 in_size )
inlinenoexcept

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