@onda-lang/binaryen-web 0.8.19 → 0.8.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.md +12 -1
- package/package.json +2 -2
package/api.md
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
const compiler = await createCompiler();
|
|
31
31
|
const { artifact } = await compiler.compileSource(source, {
|
|
32
32
|
sampleRate: audioContext.sampleRate,
|
|
33
|
-
blockSize:
|
|
33
|
+
blockSize: 512,
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
const print = ({ text }) => console.debug(text);
|
|
@@ -78,6 +78,7 @@ The returned instance provides:
|
|
|
78
78
|
- `dispose()`, an idempotent terminal release of compiler and worker resources.
|
|
79
79
|
|
|
80
80
|
Compile options accept `sampleRate`, `blockSize`, typed compile-constant overrides, and `codegen`.
|
|
81
|
+
The sample rate defaults to 48000 Hz and the block size to 512 frames.
|
|
81
82
|
Code generation can select optimization level `0..4`, shrink level `0..2`, strict or fast math,
|
|
82
83
|
SIMD, loop-containing inlining, and optional WAT emission. A successful compilation returns an
|
|
83
84
|
`OndaCompilationResult` containing the artifact, resolved source paths, and the exact source graph
|
|
@@ -206,12 +207,22 @@ the artifact metadata as the adapter constructor's second argument and
|
|
|
206
207
|
`processorOptions.executionOutputRing` as its fourth argument. Event encoding and numeric
|
|
207
208
|
unknown-index classification require that metadata.
|
|
208
209
|
|
|
210
|
+
`paramSmoothingSeconds` is an optional **host** setting on `OndaAudioProcessorOptions`, defaulting
|
|
211
|
+
to `0`. It applies finite linear ramps to continuous floating-point parameters and array elements;
|
|
212
|
+
integer, boolean, and stepped parameters update directly. Ramps publish once per logical compile
|
|
213
|
+
block, independent of Web Audio callback sizes. Durations round up to host samples and are bypassed
|
|
214
|
+
when they fit within one block. A changed target starts a fresh ramp from the published value;
|
|
215
|
+
repeated writes of the same target keep its deadline. Initial values and reinitialization settle
|
|
216
|
+
immediately, and processor snapshots do not contain the host ramps. The browser playground opts
|
|
217
|
+
into `0.03` seconds (30 ms). These block-level updates do not interpolate inside `sample:`.
|
|
218
|
+
|
|
209
219
|
### `OndaAudioProcessor`
|
|
210
220
|
|
|
211
221
|
The adapter exposes its `node` and validated `metadata`, plus these operations:
|
|
212
222
|
|
|
213
223
|
- `setParam(nameOrIndex, plain)` and `setParamNormalized(nameOrIndex, normalized)` for whole
|
|
214
224
|
parameters.
|
|
225
|
+
- `resetParams()` to restore parameter defaults immediately and cancel host ramps, retaining DSP state.
|
|
215
226
|
- `setParamElement(nameOrIndex, element, plain)` and
|
|
216
227
|
`setParamElementNormalized(nameOrIndex, element, normalized)` for one scalar or fixed-array
|
|
217
228
|
element.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onda-lang/binaryen-web",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Binaryen backend for versioned Onda MIR in browsers and Node.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"verify-mir": "node ./scripts/verify-mir.mjs"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@onda-lang/processor-abi": "0.8.
|
|
49
|
+
"@onda-lang/processor-abi": "0.8.21",
|
|
50
50
|
"binaryen": "130.0.0"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|