Search guides and the APICtrl K
  1. API reference
  2. Formats and wrappers

wasm_abi.h

The WebAssembly ABI glue (GENERATED, never authored against).

#include <sonore/wasm_abi.h>
On this page

Design notes

Appended by the compiler after the model's DSP so the SAME SonoreDsp that ships inside the native CLAP also drives the browser preview. The exported C ABI is byte-for-byte the one the AudioWorklet host already speaks (src/lib/worklet.ts → buildWasmWorkletModule): planar f32, channel stride = SONORE_MAX_FRAMES, 2 channels, params in a flat array, MIDI through a [frameOffset, status, data1, data2] × 64 inlet.

Keeping the export names (sonore_*) identical to the previous ABI is deliberate: cached wasm, stored revision sources and the compiler service contract all key off them, and there is no user-visible gain in renaming.

Macros 1

  • macro#define SONORE_GUARD_OUTPUT 1
    The output guard (output_guard.h), as every plugin format runs it: a block with a NaN or an infinity in it leaves as silence, so the preview plays what the shipped plugin plays. On unless the build says otherwise. The descriptor is not part of this build -- the glue sees only the DSP -- so a plugin whose descriptor sets guardOutput = false is compiled with SONORE_GUARD_OUTPUT=0 by whoever composes the build, or the preview guards what the plugin will not.
    wasm_abi.h:36
↑↓ to move↵ to openEvery public name in the headers, and every guide