@scalable-vector-audio/sva-wasm 0.5.0 → 0.5.1
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/package.json +1 -1
- package/sva_wasm.d.ts +7 -0
- package/sva_wasm.js +26 -5
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/sva_wasm.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export class Rendering {
|
|
|
65
65
|
* The object `sva-cli render` puts under `data.cache.stats`.
|
|
66
66
|
*/
|
|
67
67
|
stats(): any;
|
|
68
|
+
work(): any;
|
|
68
69
|
readonly channels: number;
|
|
69
70
|
readonly duration_secs: number;
|
|
70
71
|
readonly sample_rate: number;
|
|
@@ -88,6 +89,10 @@ export class Stream {
|
|
|
88
89
|
* `until` as `stream` takes it, `max_secs` counted from the checkpoint.
|
|
89
90
|
*/
|
|
90
91
|
resume(checkpoint: Checkpoint, bindings: any, until: any, bits?: number | null, max_secs?: number | null): Stream;
|
|
92
|
+
/**
|
|
93
|
+
* `{ samples, proofs, priced_flops, waves }` since it opened or resumed.
|
|
94
|
+
*/
|
|
95
|
+
work(): any;
|
|
91
96
|
readonly block: number;
|
|
92
97
|
readonly channels: number;
|
|
93
98
|
readonly end: number | undefined;
|
|
@@ -136,6 +141,7 @@ export interface InitOutput {
|
|
|
136
141
|
readonly rendering_samples: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
137
142
|
readonly rendering_stats: (a: number) => [number, number, number];
|
|
138
143
|
readonly rendering_target: (a: number) => [number, number];
|
|
144
|
+
readonly rendering_work: (a: number) => [number, number, number];
|
|
139
145
|
readonly stream_block: (a: number) => number;
|
|
140
146
|
readonly stream_channels: (a: number) => number;
|
|
141
147
|
readonly stream_checkpoint: (a: number) => number;
|
|
@@ -144,6 +150,7 @@ export interface InitOutput {
|
|
|
144
150
|
readonly stream_position: (a: number) => number;
|
|
145
151
|
readonly stream_resume: (a: number, b: number, c: any, d: any, e: number, f: number, g: number) => [number, number, number];
|
|
146
152
|
readonly stream_sample_rate: (a: number) => number;
|
|
153
|
+
readonly stream_work: (a: number) => [number, number, number];
|
|
147
154
|
readonly wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95: (a: number, b: number, c: any, d: any) => void;
|
|
148
155
|
readonly wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150: (a: number, b: number, c: any) => [number, number];
|
|
149
156
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
package/sva_wasm.js
CHANGED
|
@@ -298,6 +298,16 @@ export class Rendering {
|
|
|
298
298
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* @returns {any}
|
|
303
|
+
*/
|
|
304
|
+
work() {
|
|
305
|
+
const ret = wasm.rendering_work(this.__wbg_ptr);
|
|
306
|
+
if (ret[2]) {
|
|
307
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
308
|
+
}
|
|
309
|
+
return takeFromExternrefTable0(ret[0]);
|
|
310
|
+
}
|
|
301
311
|
}
|
|
302
312
|
if (Symbol.dispose) Rendering.prototype[Symbol.dispose] = Rendering.prototype.free;
|
|
303
313
|
|
|
@@ -395,6 +405,17 @@ export class Stream {
|
|
|
395
405
|
const ret = wasm.stream_sample_rate(this.__wbg_ptr);
|
|
396
406
|
return ret >>> 0;
|
|
397
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* `{ samples, proofs, priced_flops, waves }` since it opened or resumed.
|
|
410
|
+
* @returns {any}
|
|
411
|
+
*/
|
|
412
|
+
work() {
|
|
413
|
+
const ret = wasm.stream_work(this.__wbg_ptr);
|
|
414
|
+
if (ret[2]) {
|
|
415
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
416
|
+
}
|
|
417
|
+
return takeFromExternrefTable0(ret[0]);
|
|
418
|
+
}
|
|
398
419
|
}
|
|
399
420
|
if (Symbol.dispose) Stream.prototype[Symbol.dispose] = Stream.prototype.free;
|
|
400
421
|
|
|
@@ -571,7 +592,7 @@ function __wbg_get_imports() {
|
|
|
571
592
|
const ret = arg0.navigator;
|
|
572
593
|
return ret;
|
|
573
594
|
},
|
|
574
|
-
|
|
595
|
+
__wbg_new_27e74e58f1461a9c: function(arg0, arg1) {
|
|
575
596
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
576
597
|
return ret;
|
|
577
598
|
},
|
|
@@ -619,7 +640,7 @@ function __wbg_get_imports() {
|
|
|
619
640
|
const ret = arg0.next();
|
|
620
641
|
return ret;
|
|
621
642
|
}, arguments); },
|
|
622
|
-
|
|
643
|
+
__wbg_parse_74b31fef7234e333: function() { return handleError(function (arg0, arg1) {
|
|
623
644
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
624
645
|
return ret;
|
|
625
646
|
}, arguments); },
|
|
@@ -655,10 +676,10 @@ function __wbg_get_imports() {
|
|
|
655
676
|
__wbg_set_create_8c556c6febf6436c: function(arg0, arg1) {
|
|
656
677
|
arg0.create = arg1 !== 0;
|
|
657
678
|
},
|
|
658
|
-
|
|
679
|
+
__wbg_set_name_fb6171210e935eeb: function(arg0, arg1, arg2) {
|
|
659
680
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
660
681
|
},
|
|
661
|
-
|
|
682
|
+
__wbg_set_refusal_a80f0d1c079e712a: function(arg0, arg1) {
|
|
662
683
|
arg0.refusal = arg1;
|
|
663
684
|
},
|
|
664
685
|
__wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
|
|
@@ -693,7 +714,7 @@ function __wbg_get_imports() {
|
|
|
693
714
|
return ret;
|
|
694
715
|
}, arguments); },
|
|
695
716
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
696
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
717
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 98, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
697
718
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150);
|
|
698
719
|
return ret;
|
|
699
720
|
},
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|