Skip to main content

save_extra

Function save_extra 

Source
pub fn save_extra<P: PluginRuntime>(
    snapshot: &SnapshotSlot,
    plugin: &PluginMutex<P>,
) -> Vec<u8> 
Expand description

Read the plugin’s custom-state blob for a host state save.

Prefers the lock-free SnapshotSlot the audio thread publishes each block; only when the plugin doesn’t opt into snapshots (nothing published) does it fall back to locking the plugin and calling save_state(). So a snapshot-capable plugin’s host save never touches the plugin lock and never waits on an in-flight audio block. Params are serialized separately (lock-free), so this is the only piece of a save that could contend the lock.