alpha2 0.5.0 → 0.5.2

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/dist/assets.d.ts CHANGED
@@ -54,6 +54,23 @@ export interface AssetEntry {
54
54
  * alpha, or VP9 alpha without `libvpx`).
55
55
  */
56
56
  readonly alpha_dropped?: string;
57
+ /**
58
+ * Every audio stream of the original in container order, which a clip's `audio.stream` counts
59
+ * over. Without it, clips' stream and channel choices are not checked.
60
+ */
61
+ readonly audio_streams?: readonly AudioStreamFacts[];
62
+ }
63
+ /** One audio stream of an original, as the host probed it. */
64
+ export interface AudioStreamFacts {
65
+ /** Channels the stream decodes to. */
66
+ readonly channels: number;
67
+ /** Whether a clip without `audio.stream` plays this stream. Default false. */
68
+ readonly default?: boolean;
69
+ readonly codec?: string;
70
+ /** The speaker of each channel as `FFmpeg` channel names, when declared. */
71
+ readonly layout?: readonly string[];
72
+ readonly language?: string;
73
+ readonly title?: string;
57
74
  }
58
75
  /** Media state of every source on one host. Runtime state, never part of a project. */
59
76
  export interface AssetCatalog {
@@ -131,6 +148,12 @@ export type ConformIssue = {
131
148
  | {
132
149
  readonly kind: "alpha_dropped";
133
150
  readonly reason: string;
151
+ }
152
+ /** A clip plays an audio stream or channel the original lacks. Always blocking. */
153
+ | {
154
+ readonly kind: "audio_selection";
155
+ readonly clip: string;
156
+ readonly reason: string;
134
157
  });
135
158
  /** One source's media for the purpose. */
136
159
  export interface SourceConform {
package/dist/effects.d.ts CHANGED
@@ -121,13 +121,19 @@ export interface WasmCompiledEffect {
121
121
  export interface WasmEffectRegistry {
122
122
  /**
123
123
  * Compiles one effect definition without holding the binding while the browser compiles.
124
- * Rejects with `EFFECT_ERROR` and the shader's diagnostics.
124
+ * Rejects with `EFFECT_ERROR` and the shader's diagnostics. The CPU renderer only validates the
125
+ * definition, since it cannot draw runtime effects.
125
126
  */
126
127
  compileEffect(definitionJson: string): Promise<WasmCompiledEffect>;
127
128
  /** Returns `id@version`; throws `EFFECT_ERROR` if that id was registered meanwhile. */
128
129
  registerCompiledEffect(compiled: WasmCompiledEffect): string;
129
130
  unregisterEffect(id: string, version: number): boolean;
130
131
  clearEffects(): void;
132
+ /**
133
+ * Registered runtime effects the loaded project can draw, as `id@version`. On the CPU renderer
134
+ * any of them makes rendering and export fail with `EFFECT_ERROR`.
135
+ */
136
+ projectRuntimeEffects(): string[];
131
137
  builtinCatalog(): string;
132
138
  registerLut3d(id: string, cube: string): void;
133
139
  unregisterEffectResource(id: string): boolean;
@@ -137,7 +143,10 @@ export interface WasmEffectRegistry {
137
143
  export type AudioContinuity = "exact" | "continue-small-gaps";
138
144
  /** Generated wasm renderer surface, shared by the GPU and CPU renderers. */
139
145
  export interface WasmCanvasRenderer extends WasmEffectRegistry {
140
- /** Absent means `"gpu"`. The CPU renderer rejects runtime effects with `EFFECT_ERROR`. */
146
+ /**
147
+ * Absent means `"gpu"`. The CPU renderer registers runtime effects but refuses a project that
148
+ * draws one with `EFFECT_ERROR`.
149
+ */
141
150
  readonly renderer?: "gpu" | "cpu";
142
151
  /** Absent on the CPU renderer. */
143
152
  readonly backend?: "webgpu" | "webgl2";
@@ -194,9 +203,11 @@ export interface WasmCanvasRenderer extends WasmEffectRegistry {
194
203
  * block. Upload zeros past a source's end, or pass `endsSource` when the upload reaches it.
195
204
  *
196
205
  * An upload replaces overlapping windows and joins adjacent ones. Throws `RESOURCE_LIMIT` (not
197
- * fatal) over 600 s or the store's 512 MiB, and `INVALID_INPUT` when malformed.
206
+ * fatal) over 600 s or the store's 512 MiB, and `INVALID_INPUT` when malformed. `stream` is the
207
+ * audio stream an {@link audioNeeds} entry names, absent for the default one; each stream of a
208
+ * source is held apart.
198
209
  */
199
- uploadAudioBlock(sourceId: string, startSample: bigint, sampleRate: number, layout: number | readonly AudioSpeaker[], samples: Float32Array, endsSource?: boolean): void;
210
+ uploadAudioBlock(sourceId: string, startSample: bigint, sampleRate: number, layout: number | readonly AudioSpeaker[], samples: Float32Array, endsSource?: boolean, stream?: number): void;
200
211
  /** Maximum samples per channel per {@link renderAudio} call. */
201
212
  readonly audioMaxBlock: number;
202
213
  /**
@@ -204,7 +215,11 @@ export interface WasmCanvasRenderer extends WasmEffectRegistry {
204
215
  * A longer block throws `INVALID_INPUT` (not fatal).
205
216
  */
206
217
  renderAudio(startSample: bigint, frames: number, playing: boolean): Float32Array;
207
- /** JSON source intervals required before a sample window can be mixed. */
218
+ /**
219
+ * JSON `[{sourceId, stream?, startTicks, endTicks}]`: source intervals required before a sample
220
+ * window can be mixed. `stream` is set for clips playing another audio stream than the default
221
+ * one (`audio.stream`).
222
+ */
208
223
  audioNeeds(startSample: bigint, frames: number): string;
209
224
  /**
210
225
  * Starts (from empty) or stops loudness metering before the master limiter. Starting resets the
@@ -229,8 +244,11 @@ export interface WasmCanvasRenderer extends WasmEffectRegistry {
229
244
  audioSampleRate(): number;
230
245
  audioRetainedFrames(): number;
231
246
  audioRetainedBytes(): number;
232
- /** JSON `[{startSample, endSample}]` of a source's retained half-open windows, newest first. */
233
- audioRetainedWindows(sourceId: string): string;
247
+ /**
248
+ * JSON `[{startSample, endSample}]` of the retained half-open windows of a source's `stream`
249
+ * (absent for the default one), newest first.
250
+ */
251
+ audioRetainedWindows(sourceId: string, stream?: number): string;
234
252
  releaseAudioSource(sourceId: string): boolean;
235
253
  clearAudioSources(): void;
236
254
  /**
@@ -0,0 +1,23 @@
1
+ import type { FrameRate } from "./generated/project-schema.js";
2
+ import { type Ticks } from "./project.js";
3
+ /** The frame grid of one rate, with frame starts floored to ticks as the engine places them. */
4
+ export interface Frames {
5
+ readonly rate: FrameRate;
6
+ /** Seconds at which frame `index` starts. */
7
+ start(index: number): number;
8
+ /** Ticks at which frame `index` starts. */
9
+ startTicks(index: number): Ticks;
10
+ /** The frame whose start is nearest `seconds`; a tie takes the later frame. */
11
+ index(seconds: number): number;
12
+ /** `seconds` moved to the nearest frame start. */
13
+ snap(seconds: number): number;
14
+ /** The start of the last frame shown before an exclusive `end` in seconds. */
15
+ last(end: number): number;
16
+ }
17
+ /**
18
+ * The frame grid of `rate`: whole frames per second, or `{ num, den }` (`{ num: 30000, den: 1001 }`
19
+ * for 29.97).
20
+ *
21
+ * @throws RangeError When the rate is not positive integers.
22
+ */
23
+ export declare function frames(rate: number | FrameRate): Frames;
package/dist/frames.js ADDED
@@ -0,0 +1,34 @@
1
+ import { TICKS_PER_SECOND } from "./generated/project-schema.js";
2
+ import { secondsToTicks, ticksToSeconds } from "./project.js";
3
+ /**
4
+ * The frame grid of `rate`: whole frames per second, or `{ num, den }` (`{ num: 30000, den: 1001 }`
5
+ * for 29.97).
6
+ *
7
+ * @throws RangeError When the rate is not positive integers.
8
+ */
9
+ export function frames(rate) {
10
+ const { num, den } = typeof rate === "number" ? { num: rate, den: 1 } : rate;
11
+ if (!Number.isSafeInteger(num) ||
12
+ !Number.isSafeInteger(den) ||
13
+ num <= 0 ||
14
+ den <= 0)
15
+ throw new RangeError(`${JSON.stringify(rate)} is not a frame rate: write fps or { num, den }`);
16
+ const n = BigInt(num);
17
+ const scale = BigInt(TICKS_PER_SECOND) * BigInt(den);
18
+ // Floor division, as BigInt division truncates toward zero.
19
+ const floorDiv = (a, b) => a / b - (a % b !== 0n && a < 0n !== b < 0n ? 1n : 0n);
20
+ const startTicks = (index) => Number(floorDiv(BigInt(index) * scale, n));
21
+ const start = (index) => ticksToSeconds(startTicks(index));
22
+ const index = (seconds) => Number(floorDiv(2n * BigInt(secondsToTicks(seconds)) * n + scale, 2n * scale));
23
+ return Object.freeze({
24
+ rate: Object.freeze({ num, den }),
25
+ start,
26
+ startTicks,
27
+ index,
28
+ snap: (seconds) => start(index(seconds)),
29
+ last(end) {
30
+ const before = BigInt(secondsToTicks(end)) - 1n;
31
+ return start(Number(-floorDiv(-(before + 1n) * n, scale) - 1n));
32
+ },
33
+ });
34
+ }
@@ -414,6 +414,12 @@ export type AudioEffect = {
414
414
  * Per-clip audio presentation controls.
415
415
  */
416
416
  export interface AudioProperties {
417
+ /**
418
+ * The stream's channels the clip plays, by index. One index plays that channel as a mono
419
+ * source; two play a stereo pair, left then right. Absent plays every channel, folded by
420
+ * speaker position. At most two distinct indices.
421
+ */
422
+ readonly channels?: readonly number[] | null;
417
423
  /**
418
424
  * Ordered single-input effects applied before the track bus, at most `MAX_CHAIN_EFFECTS`.
419
425
  *
@@ -461,6 +467,11 @@ export interface AudioProperties {
461
467
  * No effect at speed 1, on loops or on freezes.
462
468
  */
463
469
  readonly preserve_pitch?: boolean;
470
+ /**
471
+ * The source's audio stream the clip plays, counted from 0 over the file's audio streams in
472
+ * container order. Absent plays the stream the host picks by default.
473
+ */
474
+ readonly stream?: number | null;
464
475
  }
465
476
  /**
466
477
  * An audio stream's channel count and sample rate.
@@ -368,6 +368,15 @@ export const PROJECT_SHAPE = {
368
368
  AudioProperties: {
369
369
  additionalProperties: false,
370
370
  properties: {
371
+ channels: {
372
+ items: {
373
+ format: "uint32",
374
+ maximum: 4294967295,
375
+ minimum: 0,
376
+ type: "integer",
377
+ },
378
+ type: ["array", "null"],
379
+ },
371
380
  effects: {
372
381
  default: [],
373
382
  items: { $ref: "#/$defs/AudioEffect" },
@@ -386,6 +395,12 @@ export const PROJECT_SHAPE = {
386
395
  default: { mode: "constant", value: 0 },
387
396
  },
388
397
  preserve_pitch: { type: "boolean" },
398
+ stream: {
399
+ format: "uint32",
400
+ maximum: 4294967295,
401
+ minimum: 0,
402
+ type: ["integer", "null"],
403
+ },
389
404
  },
390
405
  type: "object",
391
406
  },
package/dist/index.d.ts CHANGED
@@ -10,11 +10,13 @@ export * from "./exporter.js";
10
10
  export * from "./export-metrics.js";
11
11
  export * from "./extensions.js";
12
12
  export * from "./frame-supply.js";
13
+ export * from "./frames.js";
13
14
  export * from "./frame-intake.js";
14
15
  export * from "./gpu-recovery.js";
15
16
  export * from "./hdr-frames.js";
16
17
  export * from "./loudness.js";
17
18
  export * from "./media.js";
19
+ export * from "./paint.js";
18
20
  export * from "./player.js";
19
21
  export * from "./project.js";
20
22
  export * from "./rate-control.js";
package/dist/index.js CHANGED
@@ -10,11 +10,13 @@ export * from "./exporter.js";
10
10
  export * from "./export-metrics.js";
11
11
  export * from "./extensions.js";
12
12
  export * from "./frame-supply.js";
13
+ export * from "./frames.js";
13
14
  export * from "./frame-intake.js";
14
15
  export * from "./gpu-recovery.js";
15
16
  export * from "./hdr-frames.js";
16
17
  export * from "./loudness.js";
17
18
  export * from "./media.js";
19
+ export * from "./paint.js";
18
20
  export * from "./player.js";
19
21
  export * from "./project.js";
20
22
  export * from "./rate-control.js";
@@ -4,6 +4,7 @@ import { type InputAudioTrack, type InputVideoTrack, Quality } from "mediabunny"
4
4
  import type { AudioDecoderRefillRequest, AudioSpeaker, BrowserDecodedFrame, BrowserAudioBlock, BrowserAudioDecoder, BrowserVideoDecoder, BrowserVideoDecoderOptions, DecoderRefillRequest, OptionalMediaAdapterFactory } from "./media.js";
5
5
  import { type TrackDecodeFacts } from "./hdr-frames.js";
6
6
  import type { ColorMetadata } from "./generated/project-schema.js";
7
+ import type { AudioStreamFacts } from "./assets.js";
7
8
  import type { BrowserAudioBlockSink } from "./audio.js";
8
9
  import type { BrowserEncodeSink, ExportedFrame } from "./exporter.js";
9
10
  import type { VideoRateControl } from "./rate-control.js";
@@ -100,6 +101,12 @@ export interface DecodableAudioTrack {
100
101
  * 5.1). Rejects with {@link DecodeUnavailableError} when the track does not decode as declared.
101
102
  */
102
103
  export declare function probeAudioDecode(name: string, track: InputAudioTrack, declared: readonly AudioSpeaker[] | null): Promise<DecodableAudioTrack>;
104
+ /**
105
+ * Every audio stream of `resource` in container order, as an `AssetEntry.audio_streams` lists
106
+ * them: a clip's `audio.stream` counts over these, and `default` marks the primary track. Empty
107
+ * without audio.
108
+ */
109
+ export declare function probeAudioStreams(resource: MediabunnyInput): Promise<AudioStreamFacts[]>;
103
110
  /** {@link probeAudioDecode} on the primary audio track; rejects with `Error` when there is none. */
104
111
  export declare function probeAudioSource(name: string, resource: MediabunnyInput): Promise<DecodableAudioTrack>;
105
112
  /**
@@ -117,11 +124,15 @@ export declare class MediabunnyAudioDecoder implements BrowserAudioDecoder {
117
124
  readonly speakers: readonly AudioSpeaker[] | null;
118
125
  private constructor();
119
126
  /**
120
- * Opens `resource`'s primary audio track. Rejects when there is none, with `RangeError` for more
121
- * than {@link MAX_AUDIO_CHANNELS} channels or a rate outside 1 kHz to 768 kHz, and with
122
- * {@link DecodeUnavailableError} when this browser cannot decode it.
127
+ * Opens `resource`'s primary audio track, or with `options.stream` the audio track at that
128
+ * position among the file's audio tracks in container order (a clip's `audio.stream`). Rejects
129
+ * when there is no such track, with `RangeError` for more than {@link MAX_AUDIO_CHANNELS}
130
+ * channels or a rate outside 1 kHz to 768 kHz, and with {@link DecodeUnavailableError} when this
131
+ * browser cannot decode it.
123
132
  */
124
- static open(sourceId: string, resource: MediabunnyInput, binding: AudioResamplerBinding): Promise<MediabunnyAudioDecoder>;
133
+ static open(sourceId: string, resource: MediabunnyInput, binding: AudioResamplerBinding, options?: {
134
+ readonly stream?: number;
135
+ }): Promise<MediabunnyAudioDecoder>;
125
136
  /**
126
137
  * Decodes the interval at `projectSampleRate`, plus two samples each side; silence outside the
127
138
  * stream. Rejects when closed, for another source or empty interval, on abort, or when the track
@@ -906,6 +906,37 @@ export async function probeAudioDecode(name, track, declared) {
906
906
  };
907
907
  throw refuse(`the decoder delivers ${trial.channels} channels for a source that declares ${track.numberOfChannels}`);
908
908
  }
909
+ /**
910
+ * Every audio stream of `resource` in container order, as an `AssetEntry.audio_streams` lists
911
+ * them: a clip's `audio.stream` counts over these, and `default` marks the primary track. Empty
912
+ * without audio.
913
+ */
914
+ export async function probeAudioStreams(resource) {
915
+ const input = new Input({
916
+ source: resource instanceof Blob
917
+ ? new BlobSource(resource)
918
+ : new BufferSource(resource),
919
+ formats: ALL_FORMATS,
920
+ });
921
+ try {
922
+ const tracks = await input.getAudioTracks();
923
+ const primary = await input.getPrimaryAudioTrack();
924
+ return await Promise.all(tracks.map(async (track) => {
925
+ const language = await track.getLanguageCode();
926
+ const title = await track.getName();
927
+ return {
928
+ channels: track.numberOfChannels,
929
+ default: track === primary,
930
+ ...(track.codec === null ? {} : { codec: track.codec }),
931
+ ...(language === "und" ? {} : { language }),
932
+ ...(title ? { title } : {}),
933
+ };
934
+ }));
935
+ }
936
+ finally {
937
+ input.dispose();
938
+ }
939
+ }
909
940
  /** {@link probeAudioDecode} on the primary audio track; rejects with `Error` when there is none. */
910
941
  export async function probeAudioSource(name, resource) {
911
942
  const input = new Input({
@@ -972,19 +1003,25 @@ export class MediabunnyAudioDecoder {
972
1003
  this.#facts = facts;
973
1004
  }
974
1005
  /**
975
- * Opens `resource`'s primary audio track. Rejects when there is none, with `RangeError` for more
976
- * than {@link MAX_AUDIO_CHANNELS} channels or a rate outside 1 kHz to 768 kHz, and with
977
- * {@link DecodeUnavailableError} when this browser cannot decode it.
1006
+ * Opens `resource`'s primary audio track, or with `options.stream` the audio track at that
1007
+ * position among the file's audio tracks in container order (a clip's `audio.stream`). Rejects
1008
+ * when there is no such track, with `RangeError` for more than {@link MAX_AUDIO_CHANNELS}
1009
+ * channels or a rate outside 1 kHz to 768 kHz, and with {@link DecodeUnavailableError} when this
1010
+ * browser cannot decode it.
978
1011
  */
979
- static async open(sourceId, resource, binding) {
1012
+ static async open(sourceId, resource, binding, options = {}) {
980
1013
  const source = resource instanceof Blob
981
1014
  ? new BlobSource(resource)
982
1015
  : new BufferSource(resource);
983
1016
  const input = new Input({ source, formats: ALL_FORMATS });
984
- const track = await input.getPrimaryAudioTrack();
1017
+ const track = options.stream === undefined
1018
+ ? await input.getPrimaryAudioTrack()
1019
+ : ((await input.getAudioTracks())[options.stream] ?? null);
985
1020
  if (track === null) {
986
1021
  input.dispose();
987
- throw new Error("mediabunny input has no audio track");
1022
+ throw new Error(options.stream === undefined
1023
+ ? "mediabunny input has no audio track"
1024
+ : `mediabunny input has no audio stream ${options.stream}`);
988
1025
  }
989
1026
  if (track.numberOfChannels < 1 ||
990
1027
  track.numberOfChannels > MAX_AUDIO_CHANNELS) {
@@ -0,0 +1,23 @@
1
+ import type { Paint, Rgba, Spread, Vec2 } from "./generated/project-schema.js";
2
+ /** A gradient color: spread evenly with its neighbours, or at `[offset, color]`. */
3
+ export type ColorStop = Rgba | readonly [number, Rgba];
4
+ export type LinearGradient = Extract<Paint, {
5
+ readonly type: "linear_gradient";
6
+ }>;
7
+ export type RadialGradient = Extract<Paint, {
8
+ readonly type: "radial_gradient";
9
+ }>;
10
+ /**
11
+ * A paint along the line from `start` to `end` (normalized). Colors are `"#rrggbb"` strings or
12
+ * `{ red, green, blue, alpha }` objects.
13
+ *
14
+ * @throws RangeError For fewer than two colors.
15
+ */
16
+ export declare function linearGradient(colors: readonly ColorStop[], start?: Vec2, end?: Vec2, spread?: Spread): LinearGradient;
17
+ /**
18
+ * A paint along the radius of a circle at `center`, `radius` a fraction of the shorter side;
19
+ * colors as {@link linearGradient} takes them.
20
+ *
21
+ * @throws RangeError For fewer than two colors.
22
+ */
23
+ export declare function radialGradient(colors: readonly ColorStop[], center?: Vec2, radius?: number, spread?: Spread): RadialGradient;
package/dist/paint.js ADDED
@@ -0,0 +1,37 @@
1
+ function stops(colors) {
2
+ if (colors.length < 2)
3
+ throw new RangeError("a gradient has at least two stops");
4
+ return colors.map((stop, index) => Array.isArray(stop)
5
+ ? { offset: stop[0], color: stop[1] }
6
+ : { offset: index / (colors.length - 1), color: stop });
7
+ }
8
+ /**
9
+ * A paint along the line from `start` to `end` (normalized). Colors are `"#rrggbb"` strings or
10
+ * `{ red, green, blue, alpha }` objects.
11
+ *
12
+ * @throws RangeError For fewer than two colors.
13
+ */
14
+ export function linearGradient(colors, start = { x: 0, y: 0 }, end = { x: 1, y: 1 }, spread) {
15
+ return {
16
+ type: "linear_gradient",
17
+ start,
18
+ end,
19
+ stops: stops(colors),
20
+ ...(spread === undefined ? {} : { spread }),
21
+ };
22
+ }
23
+ /**
24
+ * A paint along the radius of a circle at `center`, `radius` a fraction of the shorter side;
25
+ * colors as {@link linearGradient} takes them.
26
+ *
27
+ * @throws RangeError For fewer than two colors.
28
+ */
29
+ export function radialGradient(colors, center = { x: 0.5, y: 0.5 }, radius = 0.5, spread) {
30
+ return {
31
+ type: "radial_gradient",
32
+ center,
33
+ radius,
34
+ stops: stops(colors),
35
+ ...(spread === undefined ? {} : { spread }),
36
+ };
37
+ }
package/dist/project.d.ts CHANGED
@@ -109,7 +109,7 @@ export interface CanonicalInsets {
109
109
  }
110
110
  /** A layout node's `translate` as the engine writes it. */
111
111
  export type CanonicalOffset = Exclude<LayoutOffset, string>;
112
- type Same<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;
112
+ type Same<A, B> = (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ? 1 : 2 ? true : false;
113
113
  /**
114
114
  * `T` in the forms the engine writes, as {@link canonicalProject} returns them. Lengths and grid
115
115
  * values keep their CSS spelling.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alpha2",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "license": "MIT",
5
5
  "description": "JavaScript bindings for the standalone alpha2 media engine.",
6
6
  "repository": {
Binary file
@@ -69,8 +69,8 @@ export class ClockStep {
69
69
  }
70
70
 
71
71
  /**
72
- * A runtime effect compiled by [`WebEffectRegistry::compile_effect`],
73
- * waiting for [`WebEffectRegistry::register_compiled_effect`].
72
+ * A runtime effect compiled by a renderer's `compileEffect`, waiting for the same renderer's
73
+ * `registerCompiledEffect`.
74
74
  */
75
75
  export class CompiledEffect {
76
76
  private constructor();
@@ -345,7 +345,8 @@ export class WaveformResult {
345
345
  * The browser renderer that draws on the CPU, for a page with no GPU.
346
346
  *
347
347
  * It answers the same preview, export, text and audio calls as `WebEffectRegistry` and draws
348
- * byte-identical pictures to the native CPU renderer. Runtime effects are refused.
348
+ * byte-identical pictures to the native CPU renderer. Runtime effects register, and a project
349
+ * that draws one is refused, as the native host does on its CPU renderer.
349
350
  */
350
351
  export class WebCpuRenderer {
351
352
  private constructor();
@@ -406,7 +407,7 @@ export class WebCpuRenderer {
406
407
  * # Errors
407
408
  * Returns an error if the windows cannot be serialized.
408
409
  */
409
- audioRetainedWindows(source_id: string): string;
410
+ audioRetainedWindows(source_id: string, stream?: number | null): string;
410
411
  /**
411
412
  * Project sample rate used by uploads and mixed blocks.
412
413
  */
@@ -456,7 +457,7 @@ export class WebCpuRenderer {
456
457
  */
457
458
  clearEffectResources(): void;
458
459
  /**
459
- * Does nothing: no runtime effect registers here.
460
+ * Removes every recorded runtime effect.
460
461
  */
461
462
  clearEffects(): void;
462
463
  /**
@@ -468,10 +469,12 @@ export class WebCpuRenderer {
468
469
  */
469
470
  clearFrames(): void;
470
471
  /**
471
- * Refused: runtime effects are WGSL, which only a GPU runs.
472
+ * Validates one JSON effect definition and resolves to an entry for
473
+ * [`Self::register_compiled_effect`]. No shader is compiled, since this renderer cannot draw
474
+ * runtime effects; a project that draws one is refused when it renders or exports.
472
475
  *
473
476
  * # Errors
474
- * Always rejects with `EFFECT_ERROR`.
477
+ * Throws `EFFECT_ERROR` for a definition the engine refuses.
475
478
  */
476
479
  compileEffect(json: string): Promise<any>;
477
480
  /**
@@ -529,10 +532,15 @@ export class WebCpuRenderer {
529
532
  */
530
533
  loudnessReport(): string;
531
534
  /**
532
- * Refused, as [`Self::compile_effect`] is.
535
+ * `WebEffectRegistry.projectRuntimeEffects`: the recorded runtime effects the loaded project
536
+ * can draw. Any of them makes rendering and export refuse.
537
+ */
538
+ projectRuntimeEffects(): string[];
539
+ /**
540
+ * Records an effect [`Self::compile_effect`] validated and returns its `id@version`.
533
541
  *
534
542
  * # Errors
535
- * Always throws `EFFECT_ERROR`.
543
+ * Throws `EFFECT_ERROR` for an effect a GPU renderer compiled or one already registered.
536
544
  */
537
545
  registerCompiledEffect(compiled: CompiledEffect): string;
538
546
  /**
@@ -543,7 +551,7 @@ export class WebCpuRenderer {
543
551
  */
544
552
  registerLut3d(id: string, cube: string): void;
545
553
  /**
546
- * Drops one source's retained audio.
554
+ * Drops one source's retained audio, every stream of it.
547
555
  */
548
556
  releaseAudioSource(source_id: string): boolean;
549
557
  /**
@@ -662,16 +670,16 @@ export class WebCpuRenderer {
662
670
  */
663
671
  unregisterEffectResource(id: string): boolean;
664
672
  /**
665
- * `false`: no runtime effect registers here.
673
+ * Removes one recorded runtime effect.
666
674
  */
667
- unregisterEffect(_id: string, _version: number): boolean;
675
+ unregisterEffect(id: string, version: number): boolean;
668
676
  /**
669
677
  * `WebEffectRegistry.uploadAudioBlock`.
670
678
  *
671
679
  * # Errors
672
680
  * As `WebEffectRegistry.uploadAudioBlock`.
673
681
  */
674
- uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null): void;
682
+ uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null, stream?: number | null): void;
675
683
  /**
676
684
  * [`Self::upload_presented_video_frame`] for a bitmap made with `premultiplyAlpha: "none"`.
677
685
  * Always closes `bitmap`.
@@ -834,7 +842,9 @@ export class WebEffectRegistry {
834
842
  /**
835
843
  * Source intervals a host must decode before mixing a sample range, including
836
844
  * interpolation neighbours, read-ahead, delay lines, and after a seek the settling history
837
- * effect stages replay. Tick values are strings to preserve the full i64 range.
845
+ * effect stages replay, as JSON `[{sourceId, stream?, startTicks, endTicks}]`. `stream` is
846
+ * set when clips play another audio stream than the default one (`audio.stream`). Tick values
847
+ * are strings to preserve the full i64 range.
838
848
  */
839
849
  audioNeeds(start_sample: bigint, frames: number): string;
840
850
  /**
@@ -846,11 +856,11 @@ export class WebEffectRegistry {
846
856
  */
847
857
  audioRetainedFrames(): number;
848
858
  /**
849
- * Half-open project-rate sample intervals of one source's windows, most recently uploaded
850
- * first, as JSON `[{startSample, endSample}]`. A host decodes only what these do not
859
+ * Half-open project-rate sample intervals of the windows of one source's `stream` (absent for
860
+ * the default one), most recently uploaded first, as JSON `[{startSample, endSample}]`. A host decodes only what these do not
851
861
  * cover, since the store may have extended, replaced or dropped windows.
852
862
  */
853
- audioRetainedWindows(source_id: string): string;
863
+ audioRetainedWindows(source_id: string, stream?: number | null): string;
854
864
  /**
855
865
  * Project sample rate used by uploads and mixed blocks.
856
866
  */
@@ -1065,6 +1075,11 @@ export class WebEffectRegistry {
1065
1075
  * Draws an uploaded frame to the configured worker canvas.
1066
1076
  */
1067
1077
  presentUploadedFrame(source_id: string, media_time_ticks: bigint): void;
1078
+ /**
1079
+ * The registered runtime effects the loaded project can draw, as `id@version` strings,
1080
+ * sorted; empty without a project. Built-ins are not listed.
1081
+ */
1082
+ projectRuntimeEffects(): string[];
1068
1083
  /**
1069
1084
  * Adds an effect [`Self::compile_effect`] compiled on this binding and returns its
1070
1085
  * `id@version`. The compiled effect is consumed either way.
@@ -1079,7 +1094,7 @@ export class WebEffectRegistry {
1079
1094
  */
1080
1095
  registerLut3d(id: string, cube: string): void;
1081
1096
  /**
1082
- * Drops one source's retained audio.
1097
+ * Drops one source's retained audio, every stream of it.
1083
1098
  */
1084
1099
  releaseAudioSource(source_id: string): boolean;
1085
1100
  /**
@@ -1247,8 +1262,11 @@ export class WebEffectRegistry {
1247
1262
  * The mixer reads a window only where it holds every sample a block needs, so a host
1248
1263
  * decoding past a source's end uploads zeros there. Alternatively pass `ends_source` with
1249
1264
  * an upload that runs to the source's end, so the source is silent after it.
1265
+ *
1266
+ * `stream` is the audio stream an `audioNeeds` entry names (absent for the default one);
1267
+ * each stream of a source is held apart.
1250
1268
  */
1251
- uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null): void;
1269
+ uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null, stream?: number | null): void;
1252
1270
  /**
1253
1271
  * [`Self::upload_presented_video_frame`] for a frame the engine should convert from planes
1254
1272
  * (HDR, or declared color) but the browser decodes only without planes. The browser's
@@ -1710,7 +1728,7 @@ export interface InitOutput {
1710
1728
  readonly webcpurenderer_audioNeeds: (a: number, b: bigint, c: number) => [number, number, number, number];
1711
1729
  readonly webcpurenderer_audioRetainedBytes: (a: number) => number;
1712
1730
  readonly webcpurenderer_audioRetainedFrames: (a: number) => number;
1713
- readonly webcpurenderer_audioRetainedWindows: (a: number, b: number, c: number) => [number, number, number, number];
1731
+ readonly webcpurenderer_audioRetainedWindows: (a: number, b: number, c: number, d: number) => [number, number, number, number];
1714
1732
  readonly webcpurenderer_audioSampleRate: (a: number) => number;
1715
1733
  readonly webcpurenderer_beginExport: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: number) => [number, number];
1716
1734
  readonly webcpurenderer_beginExportAt: (a: number, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
@@ -1734,6 +1752,7 @@ export interface InitOutput {
1734
1752
  readonly webcpurenderer_loadProject: (a: number, b: number, c: number) => [number, number];
1735
1753
  readonly webcpurenderer_loudnessReport: (a: number) => [number, number];
1736
1754
  readonly webcpurenderer_previewSize: (a: number) => [number, number, number, number];
1755
+ readonly webcpurenderer_projectRuntimeEffects: (a: number) => [number, number];
1737
1756
  readonly webcpurenderer_registerCompiledEffect: (a: number, b: number) => [number, number, number, number];
1738
1757
  readonly webcpurenderer_registerLut3d: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1739
1758
  readonly webcpurenderer_releaseAudioSource: (a: number, b: number, c: number) => number;
@@ -1762,7 +1781,7 @@ export interface InitOutput {
1762
1781
  readonly webcpurenderer_trimFramesBefore: (a: number, b: number, c: number, d: bigint) => void;
1763
1782
  readonly webcpurenderer_unregisterEffect: (a: number, b: number, c: number, d: number) => number;
1764
1783
  readonly webcpurenderer_unregisterEffectResource: (a: number, b: number, c: number) => number;
1765
- readonly webcpurenderer_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number) => [number, number];
1784
+ readonly webcpurenderer_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number, i: number) => [number, number];
1766
1785
  readonly webcpurenderer_uploadPresentedImageBitmap: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1767
1786
  readonly webcpurenderer_uploadPresentedLinearFrame: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
1768
1787
  readonly webcpurenderer_uploadPresentedLinearImage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
@@ -1786,7 +1805,7 @@ export interface InitOutput {
1786
1805
  readonly webeffectregistry_audioNeeds: (a: number, b: bigint, c: number) => [number, number, number, number];
1787
1806
  readonly webeffectregistry_audioRetainedBytes: (a: number) => number;
1788
1807
  readonly webeffectregistry_audioRetainedFrames: (a: number) => number;
1789
- readonly webeffectregistry_audioRetainedWindows: (a: number, b: number, c: number) => [number, number, number, number];
1808
+ readonly webeffectregistry_audioRetainedWindows: (a: number, b: number, c: number, d: number) => [number, number, number, number];
1790
1809
  readonly webeffectregistry_audioSampleRate: (a: number) => number;
1791
1810
  readonly webeffectregistry_backend: (a: number) => [number, number];
1792
1811
  readonly webeffectregistry_beginExport: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: number) => [number, number];
@@ -1818,6 +1837,7 @@ export interface InitOutput {
1818
1837
  readonly webeffectregistry_loudnessReport: (a: number) => [number, number];
1819
1838
  readonly webeffectregistry_presentUploadedFrame: (a: number, b: number, c: number, d: bigint) => [number, number];
1820
1839
  readonly webeffectregistry_previewSize: (a: number) => [number, number, number, number];
1840
+ readonly webeffectregistry_projectRuntimeEffects: (a: number) => [number, number];
1821
1841
  readonly webeffectregistry_registerCompiledEffect: (a: number, b: number) => [number, number, number, number];
1822
1842
  readonly webeffectregistry_registerLut3d: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1823
1843
  readonly webeffectregistry_releaseAudioSource: (a: number, b: number, c: number) => number;
@@ -1847,7 +1867,7 @@ export interface InitOutput {
1847
1867
  readonly webeffectregistry_trimFramesBefore: (a: number, b: number, c: number, d: bigint) => void;
1848
1868
  readonly webeffectregistry_unregisterEffect: (a: number, b: number, c: number, d: number) => number;
1849
1869
  readonly webeffectregistry_unregisterEffectResource: (a: number, b: number, c: number) => number;
1850
- readonly webeffectregistry_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number) => [number, number];
1870
+ readonly webeffectregistry_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number, i: number) => [number, number];
1851
1871
  readonly webeffectregistry_uploadDegradedVideoFrame: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1852
1872
  readonly webeffectregistry_uploadPresentedImageBitmap: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1853
1873
  readonly webeffectregistry_uploadPresentedLinearFrame: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
@@ -1865,12 +1885,12 @@ export interface InitOutput {
1865
1885
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___js_sys_dcf218532b47778c___Function_fn_wasm_bindgen_d171202afaeab6f2___JsValue_____wasm_bindgen_d171202afaeab6f2___sys__Undefined___js_sys_dcf218532b47778c___Function_fn_wasm_bindgen_d171202afaeab6f2___JsValue_____wasm_bindgen_d171202afaeab6f2___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
1866
1886
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_: (a: number, b: number, c: any) => [number, number];
1867
1887
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_: (a: number, b: number, c: any) => [number, number];
1868
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232: (a: number, b: number, c: any) => [number, number];
1869
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235: (a: number, b: number, c: any) => [number, number];
1870
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236: (a: number, b: number, c: any) => [number, number];
1888
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__234: (a: number, b: number, c: any) => [number, number];
1889
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__237: (a: number, b: number, c: any) => [number, number];
1890
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__238: (a: number, b: number, c: any) => [number, number];
1871
1891
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___web_sys_9e2ae0ace5131457___features__gen_Event__Event______true_: (a: number, b: number, c: any) => void;
1872
1892
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_: (a: number, b: number, c: any) => void;
1873
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234: (a: number, b: number, c: any) => void;
1893
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__236: (a: number, b: number, c: any) => void;
1874
1894
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke_______true_: (a: number, b: number) => void;
1875
1895
  readonly __wbindgen_malloc: (a: number, b: number) => number;
1876
1896
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
@@ -1880,6 +1900,7 @@ export interface InitOutput {
1880
1900
  readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
1881
1901
  readonly __externref_table_dealloc: (a: number) => void;
1882
1902
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
1903
+ readonly __externref_drop_slice: (a: number, b: number) => void;
1883
1904
  readonly __wbindgen_start: () => void;
1884
1905
  }
1885
1906
 
@@ -1,10 +1,10 @@
1
1
  /* @ts-self-types="./alpha2_wasm.d.ts" */
2
- import { alpha2Canvas2d, alpha2ImagePixels, alpha2PutRgba, alpha2ResizeCanvas } from './snippets/alpha2-wasm-1313375d424845c0/inline0.js';
3
- import { alpha2BitmapUploadProbe, alpha2FrameBitmap } from './snippets/alpha2-wasm-1313375d424845c0/inline2.js';
4
- import { alpha2CopyExternalImage } from './snippets/alpha2-wasm-1313375d424845c0/inline3.js';
5
- import * as import1 from "./snippets/alpha2-wasm-1313375d424845c0/inline1.js"
6
- import * as import2 from "./snippets/alpha2-wasm-1313375d424845c0/inline1.js"
7
- import * as import3 from "./snippets/alpha2-wasm-1313375d424845c0/inline1.js"
2
+ import { alpha2Canvas2d, alpha2ImagePixels, alpha2PutRgba, alpha2ResizeCanvas } from './snippets/alpha2-wasm-a21734ffde826659/inline0.js';
3
+ import { alpha2BitmapUploadProbe, alpha2FrameBitmap } from './snippets/alpha2-wasm-a21734ffde826659/inline2.js';
4
+ import { alpha2CopyExternalImage } from './snippets/alpha2-wasm-a21734ffde826659/inline3.js';
5
+ import * as import1 from "./snippets/alpha2-wasm-a21734ffde826659/inline1.js"
6
+ import * as import2 from "./snippets/alpha2-wasm-a21734ffde826659/inline1.js"
7
+ import * as import3 from "./snippets/alpha2-wasm-a21734ffde826659/inline1.js"
8
8
 
9
9
 
10
10
  /**
@@ -159,8 +159,8 @@ export class ClockStep {
159
159
  if (Symbol.dispose) ClockStep.prototype[Symbol.dispose] = ClockStep.prototype.free;
160
160
 
161
161
  /**
162
- * A runtime effect compiled by [`WebEffectRegistry::compile_effect`],
163
- * waiting for [`WebEffectRegistry::register_compiled_effect`].
162
+ * A runtime effect compiled by a renderer's `compileEffect`, waiting for the same renderer's
163
+ * `registerCompiledEffect`.
164
164
  */
165
165
  export class CompiledEffect {
166
166
  static __wrap(ptr) {
@@ -803,7 +803,8 @@ if (Symbol.dispose) WaveformResult.prototype[Symbol.dispose] = WaveformResult.pr
803
803
  * The browser renderer that draws on the CPU, for a page with no GPU.
804
804
  *
805
805
  * It answers the same preview, export, text and audio calls as `WebEffectRegistry` and draws
806
- * byte-identical pictures to the native CPU renderer. Runtime effects are refused.
806
+ * byte-identical pictures to the native CPU renderer. Runtime effects register, and a project
807
+ * that draws one is refused, as the native host does on its CPU renderer.
807
808
  */
808
809
  export class WebCpuRenderer {
809
810
  static __wrap(ptr) {
@@ -970,15 +971,16 @@ export class WebCpuRenderer {
970
971
  * # Errors
971
972
  * Returns an error if the windows cannot be serialized.
972
973
  * @param {string} source_id
974
+ * @param {number | null} [stream]
973
975
  * @returns {string}
974
976
  */
975
- audioRetainedWindows(source_id) {
977
+ audioRetainedWindows(source_id, stream) {
976
978
  let deferred3_0;
977
979
  let deferred3_1;
978
980
  try {
979
981
  const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
980
982
  const len0 = WASM_VECTOR_LEN;
981
- const ret = wasm.webcpurenderer_audioRetainedWindows(this.__wbg_ptr, ptr0, len0);
983
+ const ret = wasm.webcpurenderer_audioRetainedWindows(this.__wbg_ptr, ptr0, len0, isLikeNone(stream) ? Number.MAX_SAFE_INTEGER : (stream) >>> 0);
982
984
  var ptr2 = ret[0];
983
985
  var len2 = ret[1];
984
986
  if (ret[3]) {
@@ -1112,7 +1114,7 @@ export class WebCpuRenderer {
1112
1114
  wasm.webcpurenderer_clearEffectResources(this.__wbg_ptr);
1113
1115
  }
1114
1116
  /**
1115
- * Does nothing: no runtime effect registers here.
1117
+ * Removes every recorded runtime effect.
1116
1118
  */
1117
1119
  clearEffects() {
1118
1120
  wasm.webcpurenderer_clearEffects(this.__wbg_ptr);
@@ -1130,10 +1132,12 @@ export class WebCpuRenderer {
1130
1132
  wasm.webcpurenderer_clearFrames(this.__wbg_ptr);
1131
1133
  }
1132
1134
  /**
1133
- * Refused: runtime effects are WGSL, which only a GPU runs.
1135
+ * Validates one JSON effect definition and resolves to an entry for
1136
+ * [`Self::register_compiled_effect`]. No shader is compiled, since this renderer cannot draw
1137
+ * runtime effects; a project that draws one is refused when it renders or exports.
1134
1138
  *
1135
1139
  * # Errors
1136
- * Always rejects with `EFFECT_ERROR`.
1140
+ * Throws `EFFECT_ERROR` for a definition the engine refuses.
1137
1141
  * @param {string} json
1138
1142
  * @returns {Promise<any>}
1139
1143
  */
@@ -1324,10 +1328,21 @@ export class WebCpuRenderer {
1324
1328
  return v1;
1325
1329
  }
1326
1330
  /**
1327
- * Refused, as [`Self::compile_effect`] is.
1331
+ * `WebEffectRegistry.projectRuntimeEffects`: the recorded runtime effects the loaded project
1332
+ * can draw. Any of them makes rendering and export refuse.
1333
+ * @returns {string[]}
1334
+ */
1335
+ projectRuntimeEffects() {
1336
+ const ret = wasm.webcpurenderer_projectRuntimeEffects(this.__wbg_ptr);
1337
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
1338
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1339
+ return v1;
1340
+ }
1341
+ /**
1342
+ * Records an effect [`Self::compile_effect`] validated and returns its `id@version`.
1328
1343
  *
1329
1344
  * # Errors
1330
- * Always throws `EFFECT_ERROR`.
1345
+ * Throws `EFFECT_ERROR` for an effect a GPU renderer compiled or one already registered.
1331
1346
  * @param {CompiledEffect} compiled
1332
1347
  * @returns {string}
1333
1348
  */
@@ -1370,7 +1385,7 @@ export class WebCpuRenderer {
1370
1385
  }
1371
1386
  }
1372
1387
  /**
1373
- * Drops one source's retained audio.
1388
+ * Drops one source's retained audio, every stream of it.
1374
1389
  * @param {string} source_id
1375
1390
  * @returns {boolean}
1376
1391
  */
@@ -1671,15 +1686,15 @@ export class WebCpuRenderer {
1671
1686
  return ret !== 0;
1672
1687
  }
1673
1688
  /**
1674
- * `false`: no runtime effect registers here.
1675
- * @param {string} _id
1676
- * @param {number} _version
1689
+ * Removes one recorded runtime effect.
1690
+ * @param {string} id
1691
+ * @param {number} version
1677
1692
  * @returns {boolean}
1678
1693
  */
1679
- unregisterEffect(_id, _version) {
1680
- const ptr0 = passStringToWasm0(_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1694
+ unregisterEffect(id, version) {
1695
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1681
1696
  const len0 = WASM_VECTOR_LEN;
1682
- const ret = wasm.webcpurenderer_unregisterEffect(this.__wbg_ptr, ptr0, len0, _version);
1697
+ const ret = wasm.webcpurenderer_unregisterEffect(this.__wbg_ptr, ptr0, len0, version);
1683
1698
  return ret !== 0;
1684
1699
  }
1685
1700
  /**
@@ -1693,11 +1708,12 @@ export class WebCpuRenderer {
1693
1708
  * @param {any} layout
1694
1709
  * @param {Float32Array} samples
1695
1710
  * @param {boolean | null} [ends_source]
1711
+ * @param {number | null} [stream]
1696
1712
  */
1697
- uploadAudioBlock(source_id, start_sample, sample_rate, layout, samples, ends_source) {
1713
+ uploadAudioBlock(source_id, start_sample, sample_rate, layout, samples, ends_source, stream) {
1698
1714
  const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1699
1715
  const len0 = WASM_VECTOR_LEN;
1700
- const ret = wasm.webcpurenderer_uploadAudioBlock(this.__wbg_ptr, ptr0, len0, start_sample, sample_rate, layout, samples, isLikeNone(ends_source) ? 0xFFFFFF : ends_source ? 1 : 0);
1716
+ const ret = wasm.webcpurenderer_uploadAudioBlock(this.__wbg_ptr, ptr0, len0, start_sample, sample_rate, layout, samples, isLikeNone(ends_source) ? 0xFFFFFF : ends_source ? 1 : 0, isLikeNone(stream) ? Number.MAX_SAFE_INTEGER : (stream) >>> 0);
1701
1717
  if (ret[1]) {
1702
1718
  throw takeFromExternrefTable0(ret[0]);
1703
1719
  }
@@ -2136,7 +2152,9 @@ export class WebEffectRegistry {
2136
2152
  /**
2137
2153
  * Source intervals a host must decode before mixing a sample range, including
2138
2154
  * interpolation neighbours, read-ahead, delay lines, and after a seek the settling history
2139
- * effect stages replay. Tick values are strings to preserve the full i64 range.
2155
+ * effect stages replay, as JSON `[{sourceId, stream?, startTicks, endTicks}]`. `stream` is
2156
+ * set when clips play another audio stream than the default one (`audio.stream`). Tick values
2157
+ * are strings to preserve the full i64 range.
2140
2158
  * @param {bigint} start_sample
2141
2159
  * @param {number} frames
2142
2160
  * @returns {string}
@@ -2176,19 +2194,20 @@ export class WebEffectRegistry {
2176
2194
  return ret >>> 0;
2177
2195
  }
2178
2196
  /**
2179
- * Half-open project-rate sample intervals of one source's windows, most recently uploaded
2180
- * first, as JSON `[{startSample, endSample}]`. A host decodes only what these do not
2197
+ * Half-open project-rate sample intervals of the windows of one source's `stream` (absent for
2198
+ * the default one), most recently uploaded first, as JSON `[{startSample, endSample}]`. A host decodes only what these do not
2181
2199
  * cover, since the store may have extended, replaced or dropped windows.
2182
2200
  * @param {string} source_id
2201
+ * @param {number | null} [stream]
2183
2202
  * @returns {string}
2184
2203
  */
2185
- audioRetainedWindows(source_id) {
2204
+ audioRetainedWindows(source_id, stream) {
2186
2205
  let deferred3_0;
2187
2206
  let deferred3_1;
2188
2207
  try {
2189
2208
  const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2190
2209
  const len0 = WASM_VECTOR_LEN;
2191
- const ret = wasm.webeffectregistry_audioRetainedWindows(this.__wbg_ptr, ptr0, len0);
2210
+ const ret = wasm.webeffectregistry_audioRetainedWindows(this.__wbg_ptr, ptr0, len0, isLikeNone(stream) ? Number.MAX_SAFE_INTEGER : (stream) >>> 0);
2192
2211
  var ptr2 = ret[0];
2193
2212
  var len2 = ret[1];
2194
2213
  if (ret[3]) {
@@ -2702,6 +2721,17 @@ export class WebEffectRegistry {
2702
2721
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2703
2722
  return v1;
2704
2723
  }
2724
+ /**
2725
+ * The registered runtime effects the loaded project can draw, as `id@version` strings,
2726
+ * sorted; empty without a project. Built-ins are not listed.
2727
+ * @returns {string[]}
2728
+ */
2729
+ projectRuntimeEffects() {
2730
+ const ret = wasm.webeffectregistry_projectRuntimeEffects(this.__wbg_ptr);
2731
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
2732
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2733
+ return v1;
2734
+ }
2705
2735
  /**
2706
2736
  * Adds an effect [`Self::compile_effect`] compiled on this binding and returns its
2707
2737
  * `id@version`. The compiled effect is consumed either way.
@@ -2748,7 +2778,7 @@ export class WebEffectRegistry {
2748
2778
  }
2749
2779
  }
2750
2780
  /**
2751
- * Drops one source's retained audio.
2781
+ * Drops one source's retained audio, every stream of it.
2752
2782
  * @param {string} source_id
2753
2783
  * @returns {boolean}
2754
2784
  */
@@ -3118,17 +3148,21 @@ export class WebEffectRegistry {
3118
3148
  * The mixer reads a window only where it holds every sample a block needs, so a host
3119
3149
  * decoding past a source's end uploads zeros there. Alternatively pass `ends_source` with
3120
3150
  * an upload that runs to the source's end, so the source is silent after it.
3151
+ *
3152
+ * `stream` is the audio stream an `audioNeeds` entry names (absent for the default one);
3153
+ * each stream of a source is held apart.
3121
3154
  * @param {string} source_id
3122
3155
  * @param {bigint} start_sample
3123
3156
  * @param {number} sample_rate
3124
3157
  * @param {any} layout
3125
3158
  * @param {Float32Array} samples
3126
3159
  * @param {boolean | null} [ends_source]
3160
+ * @param {number | null} [stream]
3127
3161
  */
3128
- uploadAudioBlock(source_id, start_sample, sample_rate, layout, samples, ends_source) {
3162
+ uploadAudioBlock(source_id, start_sample, sample_rate, layout, samples, ends_source, stream) {
3129
3163
  const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3130
3164
  const len0 = WASM_VECTOR_LEN;
3131
- const ret = wasm.webeffectregistry_uploadAudioBlock(this.__wbg_ptr, ptr0, len0, start_sample, sample_rate, layout, samples, isLikeNone(ends_source) ? 0xFFFFFF : ends_source ? 1 : 0);
3165
+ const ret = wasm.webeffectregistry_uploadAudioBlock(this.__wbg_ptr, ptr0, len0, start_sample, sample_rate, layout, samples, isLikeNone(ends_source) ? 0xFFFFFF : ends_source ? 1 : 0, isLikeNone(stream) ? Number.MAX_SAFE_INTEGER : (stream) >>> 0);
3132
3166
  if (ret[1]) {
3133
3167
  throw takeFromExternrefTable0(ret[0]);
3134
3168
  }
@@ -4215,32 +4249,32 @@ function __wbg_get_imports() {
4215
4249
  __wbg_addEventListener_9534e2dc12044ee4: function() { return handleError(function (arg0, arg1, arg2, arg3) {
4216
4250
  arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
4217
4251
  }, arguments); },
4218
- __wbg_alpha2BitmapUploadProbe_e4f6696ad3e468c6: function() { return handleError(function () {
4252
+ __wbg_alpha2BitmapUploadProbe_9498f9a64bb1419f: function() { return handleError(function () {
4219
4253
  const ret = alpha2BitmapUploadProbe();
4220
4254
  return ret;
4221
4255
  }, arguments); },
4222
- __wbg_alpha2Canvas2d_5c0b7c647c1ef267: function() { return handleError(function (arg0) {
4256
+ __wbg_alpha2Canvas2d_9222f160cb804dbe: function() { return handleError(function (arg0) {
4223
4257
  const ret = alpha2Canvas2d(arg0);
4224
4258
  return ret;
4225
4259
  }, arguments); },
4226
- __wbg_alpha2CopyExternalImage_9f7986408170e249: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
4260
+ __wbg_alpha2CopyExternalImage_ca57bdc674e031e2: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
4227
4261
  alpha2CopyExternalImage(arg0, arg1, arg2, arg3 >>> 0, arg4 >>> 0);
4228
4262
  }, arguments); },
4229
- __wbg_alpha2FrameBitmap_cd6c6571bdf4400d: function() { return handleError(function (arg0, arg1, arg2) {
4263
+ __wbg_alpha2FrameBitmap_27638f45f80ebd3a: function() { return handleError(function (arg0, arg1, arg2) {
4230
4264
  const ret = alpha2FrameBitmap(arg0, arg1 >>> 0, arg2 >>> 0);
4231
4265
  return ret;
4232
4266
  }, arguments); },
4233
- __wbg_alpha2ImagePixels_629029b6bd7af4ba: function() { return handleError(function (arg0, arg1, arg2, arg3) {
4267
+ __wbg_alpha2ImagePixels_31fb7bead838ee3f: function() { return handleError(function (arg0, arg1, arg2, arg3) {
4234
4268
  const ret = alpha2ImagePixels(arg1, arg2 >>> 0, arg3 >>> 0);
4235
4269
  const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
4236
4270
  const len1 = WASM_VECTOR_LEN;
4237
4271
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4238
4272
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4239
4273
  }, arguments); },
4240
- __wbg_alpha2PutRgba_75c2eb5d9053b3ef: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
4274
+ __wbg_alpha2PutRgba_c7eb1338c47b8c9a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
4241
4275
  alpha2PutRgba(arg0, getArrayU8FromWasm0(arg1, arg2), arg3 >>> 0, arg4 >>> 0);
4242
4276
  }, arguments); },
4243
- __wbg_alpha2ResizeCanvas_9677cbececcf952e: function() { return handleError(function (arg0, arg1, arg2) {
4277
+ __wbg_alpha2ResizeCanvas_a465112dc66efc38: function() { return handleError(function (arg0, arg1, arg2) {
4244
4278
  alpha2ResizeCanvas(arg0, arg1 >>> 0, arg2 >>> 0);
4245
4279
  }, arguments); },
4246
4280
  __wbg_apply_5d9aa7604c2490a8: function() { return handleError(function (arg0, arg1, arg2) {
@@ -6465,47 +6499,47 @@ function __wbg_get_imports() {
6465
6499
  arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
6466
6500
  }, arguments); },
6467
6501
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
6468
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3932, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6502
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3924, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6469
6503
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_);
6470
6504
  return ret;
6471
6505
  },
6472
6506
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
6473
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6507
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 344, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6474
6508
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___web_sys_9e2ae0ace5131457___features__gen_Event__Event______true_);
6475
6509
  return ret;
6476
6510
  },
6477
6511
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
6478
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUCompilationInfo")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6512
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUCompilationInfo")], shim_idx: 1700, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6479
6513
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_);
6480
6514
  return ret;
6481
6515
  },
6482
6516
  __wbindgen_generic_0000000000000004: function(arg0, arg1) {
6483
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6484
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232);
6517
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 1700, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6518
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__234);
6485
6519
  return ret;
6486
6520
  },
6487
6521
  __wbindgen_generic_0000000000000005: function(arg0, arg1) {
6488
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 1711, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6522
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 1703, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6489
6523
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
6490
6524
  return ret;
6491
6525
  },
6492
6526
  __wbindgen_generic_0000000000000006: function(arg0, arg1) {
6493
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 1711, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6494
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234);
6527
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 1703, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6528
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__236);
6495
6529
  return ret;
6496
6530
  },
6497
6531
  __wbindgen_generic_0000000000000007: function(arg0, arg1) {
6498
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6499
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235);
6532
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 1700, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6533
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__237);
6500
6534
  return ret;
6501
6535
  },
6502
6536
  __wbindgen_generic_0000000000000008: function(arg0, arg1) {
6503
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6504
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236);
6537
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 1700, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6538
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__238);
6505
6539
  return ret;
6506
6540
  },
6507
6541
  __wbindgen_generic_0000000000000009: function(arg0, arg1) {
6508
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 232, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6542
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 346, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6509
6543
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke_______true_);
6510
6544
  return ret;
6511
6545
  },
@@ -6572,9 +6606,9 @@ function __wbg_get_imports() {
6572
6606
  return {
6573
6607
  __proto__: null,
6574
6608
  "./alpha2_wasm_bg.js": import0,
6575
- "./snippets/alpha2-wasm-1313375d424845c0/inline1.js": import1,
6576
- "./snippets/alpha2-wasm-1313375d424845c0/inline1.js": import2,
6577
- "./snippets/alpha2-wasm-1313375d424845c0/inline1.js": import3,
6609
+ "./snippets/alpha2-wasm-a21734ffde826659/inline1.js": import1,
6610
+ "./snippets/alpha2-wasm-a21734ffde826659/inline1.js": import2,
6611
+ "./snippets/alpha2-wasm-a21734ffde826659/inline1.js": import3,
6578
6612
  };
6579
6613
  }
6580
6614
 
@@ -6590,8 +6624,8 @@ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46
6590
6624
  wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_(arg0, arg1, arg2);
6591
6625
  }
6592
6626
 
6593
- function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234(arg0, arg1, arg2) {
6594
- wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234(arg0, arg1, arg2);
6627
+ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__236(arg0, arg1, arg2) {
6628
+ wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__236(arg0, arg1, arg2);
6595
6629
  }
6596
6630
 
6597
6631
  function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_(arg0, arg1, arg2) {
@@ -6608,22 +6642,22 @@ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bin
6608
6642
  }
6609
6643
  }
6610
6644
 
6611
- function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232(arg0, arg1, arg2) {
6612
- const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232(arg0, arg1, arg2);
6645
+ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__234(arg0, arg1, arg2) {
6646
+ const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__234(arg0, arg1, arg2);
6613
6647
  if (ret[1]) {
6614
6648
  throw takeFromExternrefTable0(ret[0]);
6615
6649
  }
6616
6650
  }
6617
6651
 
6618
- function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235(arg0, arg1, arg2) {
6619
- const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235(arg0, arg1, arg2);
6652
+ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__237(arg0, arg1, arg2) {
6653
+ const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__237(arg0, arg1, arg2);
6620
6654
  if (ret[1]) {
6621
6655
  throw takeFromExternrefTable0(ret[0]);
6622
6656
  }
6623
6657
  }
6624
6658
 
6625
- function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236(arg0, arg1, arg2) {
6626
- const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236(arg0, arg1, arg2);
6659
+ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__238(arg0, arg1, arg2) {
6660
+ const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__238(arg0, arg1, arg2);
6627
6661
  if (ret[1]) {
6628
6662
  throw takeFromExternrefTable0(ret[0]);
6629
6663
  }
@@ -6866,6 +6900,17 @@ function getArrayI8FromWasm0(ptr, len) {
6866
6900
  return getInt8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
6867
6901
  }
6868
6902
 
6903
+ function getArrayJsValueFromWasm0(ptr, len) {
6904
+ ptr = ptr >>> 0;
6905
+ const mem = getDataViewMemory0();
6906
+ const result = [];
6907
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
6908
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
6909
+ }
6910
+ wasm.__externref_drop_slice(ptr, len);
6911
+ return result;
6912
+ }
6913
+
6869
6914
  function getArrayJsValueViewFromWasm0(ptr, len) {
6870
6915
  ptr = ptr >>> 0;
6871
6916
  const mem = getDataViewMemory0();
Binary file
@@ -89,7 +89,7 @@ export const webcpurenderer_audioMissingSources: (a: number) => [number, number,
89
89
  export const webcpurenderer_audioNeeds: (a: number, b: bigint, c: number) => [number, number, number, number];
90
90
  export const webcpurenderer_audioRetainedBytes: (a: number) => number;
91
91
  export const webcpurenderer_audioRetainedFrames: (a: number) => number;
92
- export const webcpurenderer_audioRetainedWindows: (a: number, b: number, c: number) => [number, number, number, number];
92
+ export const webcpurenderer_audioRetainedWindows: (a: number, b: number, c: number, d: number) => [number, number, number, number];
93
93
  export const webcpurenderer_audioSampleRate: (a: number) => number;
94
94
  export const webcpurenderer_beginExport: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: number) => [number, number];
95
95
  export const webcpurenderer_beginExportAt: (a: number, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
@@ -113,6 +113,7 @@ export const webcpurenderer_holdsImage: (a: number, b: number, c: number, d: big
113
113
  export const webcpurenderer_loadProject: (a: number, b: number, c: number) => [number, number];
114
114
  export const webcpurenderer_loudnessReport: (a: number) => [number, number];
115
115
  export const webcpurenderer_previewSize: (a: number) => [number, number, number, number];
116
+ export const webcpurenderer_projectRuntimeEffects: (a: number) => [number, number];
116
117
  export const webcpurenderer_registerCompiledEffect: (a: number, b: number) => [number, number, number, number];
117
118
  export const webcpurenderer_registerLut3d: (a: number, b: number, c: number, d: number, e: number) => [number, number];
118
119
  export const webcpurenderer_releaseAudioSource: (a: number, b: number, c: number) => number;
@@ -141,7 +142,7 @@ export const webcpurenderer_trimAudioBefore: (a: number, b: number, c: number, d
141
142
  export const webcpurenderer_trimFramesBefore: (a: number, b: number, c: number, d: bigint) => void;
142
143
  export const webcpurenderer_unregisterEffect: (a: number, b: number, c: number, d: number) => number;
143
144
  export const webcpurenderer_unregisterEffectResource: (a: number, b: number, c: number) => number;
144
- export const webcpurenderer_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number) => [number, number];
145
+ export const webcpurenderer_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number, i: number) => [number, number];
145
146
  export const webcpurenderer_uploadPresentedImageBitmap: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
146
147
  export const webcpurenderer_uploadPresentedLinearFrame: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
147
148
  export const webcpurenderer_uploadPresentedLinearImage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
@@ -165,7 +166,7 @@ export const webeffectregistry_audioMissingSources: (a: number) => [number, numb
165
166
  export const webeffectregistry_audioNeeds: (a: number, b: bigint, c: number) => [number, number, number, number];
166
167
  export const webeffectregistry_audioRetainedBytes: (a: number) => number;
167
168
  export const webeffectregistry_audioRetainedFrames: (a: number) => number;
168
- export const webeffectregistry_audioRetainedWindows: (a: number, b: number, c: number) => [number, number, number, number];
169
+ export const webeffectregistry_audioRetainedWindows: (a: number, b: number, c: number, d: number) => [number, number, number, number];
169
170
  export const webeffectregistry_audioSampleRate: (a: number) => number;
170
171
  export const webeffectregistry_backend: (a: number) => [number, number];
171
172
  export const webeffectregistry_beginExport: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: number) => [number, number];
@@ -197,6 +198,7 @@ export const webeffectregistry_lossReport: (a: number) => [number, number];
197
198
  export const webeffectregistry_loudnessReport: (a: number) => [number, number];
198
199
  export const webeffectregistry_presentUploadedFrame: (a: number, b: number, c: number, d: bigint) => [number, number];
199
200
  export const webeffectregistry_previewSize: (a: number) => [number, number, number, number];
201
+ export const webeffectregistry_projectRuntimeEffects: (a: number) => [number, number];
200
202
  export const webeffectregistry_registerCompiledEffect: (a: number, b: number) => [number, number, number, number];
201
203
  export const webeffectregistry_registerLut3d: (a: number, b: number, c: number, d: number, e: number) => [number, number];
202
204
  export const webeffectregistry_releaseAudioSource: (a: number, b: number, c: number) => number;
@@ -226,7 +228,7 @@ export const webeffectregistry_trimAudioBefore: (a: number, b: number, c: number
226
228
  export const webeffectregistry_trimFramesBefore: (a: number, b: number, c: number, d: bigint) => void;
227
229
  export const webeffectregistry_unregisterEffect: (a: number, b: number, c: number, d: number) => number;
228
230
  export const webeffectregistry_unregisterEffectResource: (a: number, b: number, c: number) => number;
229
- export const webeffectregistry_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number) => [number, number];
231
+ export const webeffectregistry_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number, i: number) => [number, number];
230
232
  export const webeffectregistry_uploadDegradedVideoFrame: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
231
233
  export const webeffectregistry_uploadPresentedImageBitmap: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
232
234
  export const webeffectregistry_uploadPresentedLinearFrame: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
@@ -244,12 +246,12 @@ export const webeffectregistry_videoFrameCopy: (a: number) => [number, number];
244
246
  export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___js_sys_dcf218532b47778c___Function_fn_wasm_bindgen_d171202afaeab6f2___JsValue_____wasm_bindgen_d171202afaeab6f2___sys__Undefined___js_sys_dcf218532b47778c___Function_fn_wasm_bindgen_d171202afaeab6f2___JsValue_____wasm_bindgen_d171202afaeab6f2___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
245
247
  export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_: (a: number, b: number, c: any) => [number, number];
246
248
  export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_: (a: number, b: number, c: any) => [number, number];
247
- export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232: (a: number, b: number, c: any) => [number, number];
248
- export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235: (a: number, b: number, c: any) => [number, number];
249
- export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236: (a: number, b: number, c: any) => [number, number];
249
+ export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__234: (a: number, b: number, c: any) => [number, number];
250
+ export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__237: (a: number, b: number, c: any) => [number, number];
251
+ export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__238: (a: number, b: number, c: any) => [number, number];
250
252
  export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___web_sys_9e2ae0ace5131457___features__gen_Event__Event______true_: (a: number, b: number, c: any) => void;
251
253
  export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_: (a: number, b: number, c: any) => void;
252
- export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234: (a: number, b: number, c: any) => void;
254
+ export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__236: (a: number, b: number, c: any) => void;
253
255
  export const wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke_______true_: (a: number, b: number) => void;
254
256
  export const __wbindgen_malloc: (a: number, b: number) => number;
255
257
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
@@ -259,4 +261,5 @@ export const __wbindgen_externrefs: WebAssembly.Table;
259
261
  export const __wbindgen_destroy_closure: (a: number, b: number) => void;
260
262
  export const __externref_table_dealloc: (a: number) => void;
261
263
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
264
+ export const __externref_drop_slice: (a: number, b: number) => void;
262
265
  export const __wbindgen_start: () => void;