Module state
Expand description
Legacy scalar state and complete portable gain/bypass state.
The 20-byte little-endian record stores product magic, schema version,
permanent parameter ID, and requested amplitude. It excludes smoothing
progress, host channel configuration, and transient diagnostics. Stream I/O
belongs on the control thread; decode fully before changing live state.
encode_parameters and decode_parameters provide the separate complete
version-two record, with explicit migration from version one. CLAP now saves
version two and loads either version; GainState retains the scalar API.
Structs§
- Gain
State - A validated gain snapshot, suitable for complete atomic publication.
Enums§
Constants§
- PARAMETERS_
STATE_ BYTES - Complete gain/bypass record size; CLAP also uses this version-two format.
- STATE_
BYTES
Functions§
- decode_
parameters - Decode a complete version-two record or explicitly migrate a legacy version-one scalar record with bypass off. No processor state is changed.
- encode_
parameters - Encode version two using the reusable stable-ID codec. Validate against the product schema before encoding; display/schema order does not define identity.
- read_
parameters - Read a complete version-two or legacy version-one record using at most 33 bytes (including EOF probe). Short reads and Interrupted are supported. Decode fully before publishing; stream I/O belongs on the control thread.
- write_
parameters - Write the canonical complete version-two record, supporting short writes. Discard a partially written destination if an I/O failure occurs.