Skip to content

opal-zig v2.0.0-1

Choose a tag to compare

@github-actions github-actions released this 19 Jul 04:01
· 2 commits to main since this release

Changed

  • Binds opal 2.0.0. Rendered output is bit-identical to 1.0.2, only the API shape
    changed.
  • An Opal instance is now a plain value: upstream replaced every internal pointer
    with an index, so copying, assigning, or relocating an instance is legal and a copy
    is a complete save state. The no-copy rule is gone.
  • Opal.init returns the instance by value. create and destroy remain as heap
    helpers for the roughly 70 KiB struct.
  • Methods follow the upstream renames: port is now writeReg, portBuffered is
    writeRegBuffered, read is readStatus. The raw externs are opalInit,
    opalWriteReg, and so on.
  • Constants follow the upstream renames: num_channels is now channel_count and
    num_operators is operator_count.
  • Struct mirrors follow the new pointer-free layout: op_slot, chan_index,
    mod_source, pair_index, and out_source are index fields, boolean fields are
    bool, and Opal.zero_mod is gone.

Added

  • EnvelopeStage and ChannelType, non-exhaustive enum(c_int) types for the
    envelope_stage and chan_type fields.
  • Index sentinels op_none, mod_own_fb, and ch_none.
  • A save-state test: a copied chip renders the same audio as the original.

Removed

  • The Bool alias for opal_bool, which upstream removed in favor of C11 bool.
  • The optional cross-pointer fields (master, chan, mod, channel_pair,
    out_ptr), replaced by the index fields above.