Hosted parameter metadata and inactive edits¶
HostedParameters exclusively borrows a live instance and inspects an explicit
maximum of 1..4096 parameters (zero actual parameters is valid). It owns stable
IDs, flags, raw name/module bytes and finite plain minimum/maximum/defaults.
Invalid IDs, duplicates, failed information queries, invalid ranges/defaults or
excess count reject the whole catalogue. No opaque parameter cookie is retained.
refresh replaces metadata only after the new catalogue fully validates;
consumers call it when state/rescan policy requires. The guard prevents cached
extensions from outliving or switching instances.
value reads a finite in-range plain value by stable ID. set_inactive validates
ID, read-only status, bounds and integral stepped values before dispatching one
global zero-time parameter event. It requires an inactive handle; active edits
belong to audio-thread event processing. The caller supplies the outgoing queue.
Dispatch is not acknowledgement; query the resulting value explicitly. There is
no normalization, guessing of slider skew, automatic rescan or persistence
fallback. Separate opt-in ParameterHost handlers receive extension requests. These are control-thread APIs,
not audio processing operations.
Linked Gain tests exercise exact value recall, invalid-edit preservation and active rejection. A synthetic CLAP parameter provider tests duplicate IDs, nonfinite/reversed ranges, bad defaults, stepped defaults, missing metadata, capacity, failed-refresh preservation, read-only edits and invalid returned values. The offline inspection example prints bounded hosted plain values when available.