@scalable-vector-audio/sva-wasm 0.7.2 → 0.7.3
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 +12 -13
- package/sva_wasm.js +50 -59
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/sva_wasm.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export class Composition {
|
|
|
9
9
|
constructor(name?: string | null);
|
|
10
10
|
/**
|
|
11
11
|
* Over the store in `dir`, an origin-private file system directory, or memory alone
|
|
12
|
-
* where there is none.
|
|
12
|
+
* where there is none or its store will not open.
|
|
13
13
|
*/
|
|
14
14
|
static open(name?: string | null, dir?: FileSystemDirectoryHandle | null): Promise<Composition>;
|
|
15
15
|
/**
|
|
@@ -32,7 +32,7 @@ export class Composition {
|
|
|
32
32
|
set_prune_policy(policy: string): void;
|
|
33
33
|
/**
|
|
34
34
|
* `target` block by block, through this store. `options`: `rate`, `bits`, `until`, `cache`,
|
|
35
|
-
* `live`.
|
|
35
|
+
* `live`.
|
|
36
36
|
*/
|
|
37
37
|
stream(target: string, block: number, options: any): Promise<Stream>;
|
|
38
38
|
/**
|
|
@@ -74,7 +74,8 @@ export class Rendering {
|
|
|
74
74
|
/**
|
|
75
75
|
* A target block by block, reading `@notes` as the sum of its terms, as `@hall(t, x=@notes)`.
|
|
76
76
|
* A key-up replaces a term with one whose release is a number. A term leaves with its handle
|
|
77
|
-
* once its node ends, bar the last.
|
|
77
|
+
* once its node ends, bar the last. An edit lands at the first block boundary after the store
|
|
78
|
+
* answered it; `next` and every getter answer meanwhile.
|
|
78
79
|
*/
|
|
79
80
|
export class Stream {
|
|
80
81
|
private constructor();
|
|
@@ -89,9 +90,7 @@ export class Stream {
|
|
|
89
90
|
*/
|
|
90
91
|
edit(expr: string): Promise<void>;
|
|
91
92
|
/**
|
|
92
|
-
* Reads the stored samples the next second of blocks plays,
|
|
93
|
-
* meanwhile. A block reading stored samples not yet read computes them, or, live, starts
|
|
94
|
-
* the note silent where its live remainder is not ready.
|
|
93
|
+
* Reads the stored samples the next second of blocks plays, as the stream plays on.
|
|
95
94
|
*/
|
|
96
95
|
fetch(): Promise<void>;
|
|
97
96
|
/**
|
|
@@ -161,22 +160,22 @@ export interface InitOutput {
|
|
|
161
160
|
readonly rendering_target: (a: number) => [number, number];
|
|
162
161
|
readonly rendering_work: (a: number) => [number, number, number];
|
|
163
162
|
readonly stream_add: (a: number, b: number, c: number) => any;
|
|
164
|
-
readonly stream_block: (a: number) =>
|
|
165
|
-
readonly stream_channels: (a: number) =>
|
|
163
|
+
readonly stream_block: (a: number) => number;
|
|
164
|
+
readonly stream_channels: (a: number) => number;
|
|
166
165
|
readonly stream_edit: (a: number, b: number, c: number) => any;
|
|
167
|
-
readonly stream_end: (a: number) => [number, number
|
|
166
|
+
readonly stream_end: (a: number) => [number, number];
|
|
168
167
|
readonly stream_fetch: (a: number) => any;
|
|
169
|
-
readonly stream_held_bytes: (a: number) =>
|
|
168
|
+
readonly stream_held_bytes: (a: number) => number;
|
|
170
169
|
readonly stream_next: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
171
|
-
readonly stream_position: (a: number) =>
|
|
170
|
+
readonly stream_position: (a: number) => number;
|
|
172
171
|
readonly stream_remove: (a: number, b: number) => any;
|
|
173
172
|
readonly stream_replace: (a: number, b: number, c: number, d: number) => any;
|
|
174
|
-
readonly stream_sample_rate: (a: number) =>
|
|
173
|
+
readonly stream_sample_rate: (a: number) => number;
|
|
175
174
|
readonly stream_stats: (a: number) => [number, number, number];
|
|
176
175
|
readonly stream_work: (a: number) => [number, number, number];
|
|
177
176
|
readonly wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95: (a: number, b: number, c: any, d: any) => void;
|
|
178
177
|
readonly wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150: (a: number, b: number, c: any) => [number, number];
|
|
179
|
-
readonly
|
|
178
|
+
readonly wasm_bindgen__convert__closures_____invoke__hc194386506580090: (a: number, b: number) => any;
|
|
180
179
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
181
180
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
182
181
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/sva_wasm.js
CHANGED
|
@@ -87,7 +87,7 @@ export class Composition {
|
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Over the store in `dir`, an origin-private file system directory, or memory alone
|
|
90
|
-
* where there is none.
|
|
90
|
+
* where there is none or its store will not open.
|
|
91
91
|
* @param {string | null} [name]
|
|
92
92
|
* @param {FileSystemDirectoryHandle | null} [dir]
|
|
93
93
|
* @returns {Promise<Composition>}
|
|
@@ -182,7 +182,7 @@ export class Composition {
|
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* `target` block by block, through this store. `options`: `rate`, `bits`, `until`, `cache`,
|
|
185
|
-
* `live`.
|
|
185
|
+
* `live`.
|
|
186
186
|
* @param {string} target
|
|
187
187
|
* @param {number} block
|
|
188
188
|
* @param {any} options
|
|
@@ -323,7 +323,8 @@ if (Symbol.dispose) Rendering.prototype[Symbol.dispose] = Rendering.prototype.fr
|
|
|
323
323
|
/**
|
|
324
324
|
* A target block by block, reading `@notes` as the sum of its terms, as `@hall(t, x=@notes)`.
|
|
325
325
|
* A key-up replaces a term with one whose release is a number. A term leaves with its handle
|
|
326
|
-
* once its node ends, bar the last.
|
|
326
|
+
* once its node ends, bar the last. An edit lands at the first block boundary after the store
|
|
327
|
+
* answered it; `next` and every getter answer meanwhile.
|
|
327
328
|
*/
|
|
328
329
|
export class Stream {
|
|
329
330
|
static __wrap(ptr) {
|
|
@@ -358,20 +359,14 @@ export class Stream {
|
|
|
358
359
|
*/
|
|
359
360
|
get block() {
|
|
360
361
|
const ret = wasm.stream_block(this.__wbg_ptr);
|
|
361
|
-
|
|
362
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
363
|
-
}
|
|
364
|
-
return ret[0] >>> 0;
|
|
362
|
+
return ret >>> 0;
|
|
365
363
|
}
|
|
366
364
|
/**
|
|
367
365
|
* @returns {number}
|
|
368
366
|
*/
|
|
369
367
|
get channels() {
|
|
370
368
|
const ret = wasm.stream_channels(this.__wbg_ptr);
|
|
371
|
-
|
|
372
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
373
|
-
}
|
|
374
|
-
return ret[0] >>> 0;
|
|
369
|
+
return ret >>> 0;
|
|
375
370
|
}
|
|
376
371
|
/**
|
|
377
372
|
* `expr` in place of the target.
|
|
@@ -389,15 +384,10 @@ export class Stream {
|
|
|
389
384
|
*/
|
|
390
385
|
get end() {
|
|
391
386
|
const ret = wasm.stream_end(this.__wbg_ptr);
|
|
392
|
-
if (ret[3]) {
|
|
393
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
394
|
-
}
|
|
395
387
|
return ret[0] === 0 ? undefined : ret[1];
|
|
396
388
|
}
|
|
397
389
|
/**
|
|
398
|
-
* Reads the stored samples the next second of blocks plays,
|
|
399
|
-
* meanwhile. A block reading stored samples not yet read computes them, or, live, starts
|
|
400
|
-
* the note silent where its live remainder is not ready.
|
|
390
|
+
* Reads the stored samples the next second of blocks plays, as the stream plays on.
|
|
401
391
|
* @returns {Promise<void>}
|
|
402
392
|
*/
|
|
403
393
|
fetch() {
|
|
@@ -409,10 +399,7 @@ export class Stream {
|
|
|
409
399
|
*/
|
|
410
400
|
get held_bytes() {
|
|
411
401
|
const ret = wasm.stream_held_bytes(this.__wbg_ptr);
|
|
412
|
-
|
|
413
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
414
|
-
}
|
|
415
|
-
return ret[0];
|
|
402
|
+
return ret;
|
|
416
403
|
}
|
|
417
404
|
/**
|
|
418
405
|
* Writes the next block into `out`, component `c` from `c * block`, and returns the
|
|
@@ -434,10 +421,7 @@ export class Stream {
|
|
|
434
421
|
*/
|
|
435
422
|
get position() {
|
|
436
423
|
const ret = wasm.stream_position(this.__wbg_ptr);
|
|
437
|
-
|
|
438
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
439
|
-
}
|
|
440
|
-
return ret[0];
|
|
424
|
+
return ret;
|
|
441
425
|
}
|
|
442
426
|
/**
|
|
443
427
|
* @param {number} handle
|
|
@@ -464,10 +448,7 @@ export class Stream {
|
|
|
464
448
|
*/
|
|
465
449
|
get sample_rate() {
|
|
466
450
|
const ret = wasm.stream_sample_rate(this.__wbg_ptr);
|
|
467
|
-
|
|
468
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
469
|
-
}
|
|
470
|
-
return ret[0] >>> 0;
|
|
451
|
+
return ret >>> 0;
|
|
471
452
|
}
|
|
472
453
|
/**
|
|
473
454
|
* @returns {any}
|
|
@@ -572,7 +553,7 @@ function __wbg_get_imports() {
|
|
|
572
553
|
__wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
|
|
573
554
|
arg0._wbg_cb_unref();
|
|
574
555
|
},
|
|
575
|
-
|
|
556
|
+
__wbg_arrayBuffer_8fa1b62e3be35f83: function(arg0) {
|
|
576
557
|
const ret = arg0.arrayBuffer();
|
|
577
558
|
return ret;
|
|
578
559
|
},
|
|
@@ -584,7 +565,7 @@ function __wbg_get_imports() {
|
|
|
584
565
|
const ret = arg0.call(arg1, arg2);
|
|
585
566
|
return ret;
|
|
586
567
|
}, arguments); },
|
|
587
|
-
|
|
568
|
+
__wbg_close_431a12f30dd16967: function(arg0) {
|
|
588
569
|
const ret = arg0.close();
|
|
589
570
|
return ret;
|
|
590
571
|
},
|
|
@@ -592,7 +573,7 @@ function __wbg_get_imports() {
|
|
|
592
573
|
const ret = Composition.__wrap(arg0);
|
|
593
574
|
return ret;
|
|
594
575
|
},
|
|
595
|
-
|
|
576
|
+
__wbg_createWritable_39924c898fe58254: function(arg0) {
|
|
596
577
|
const ret = arg0.createWritable();
|
|
597
578
|
return ret;
|
|
598
579
|
},
|
|
@@ -604,15 +585,15 @@ function __wbg_get_imports() {
|
|
|
604
585
|
const ret = Array.from(arg0);
|
|
605
586
|
return ret;
|
|
606
587
|
},
|
|
607
|
-
|
|
588
|
+
__wbg_getDirectoryHandle_a1f6c2ddc8e8180b: function(arg0, arg1, arg2, arg3) {
|
|
608
589
|
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
609
590
|
return ret;
|
|
610
591
|
},
|
|
611
|
-
|
|
592
|
+
__wbg_getFileHandle_81f015ebb1e92030: function(arg0, arg1, arg2, arg3) {
|
|
612
593
|
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
613
594
|
return ret;
|
|
614
595
|
},
|
|
615
|
-
|
|
596
|
+
__wbg_getFile_553fb0f9fc58716e: function(arg0) {
|
|
616
597
|
const ret = arg0.getFile();
|
|
617
598
|
return ret;
|
|
618
599
|
},
|
|
@@ -642,7 +623,7 @@ function __wbg_get_imports() {
|
|
|
642
623
|
const ret = Array.isArray(arg0);
|
|
643
624
|
return ret;
|
|
644
625
|
},
|
|
645
|
-
|
|
626
|
+
__wbg_keys_18de252854592697: function(arg0) {
|
|
646
627
|
const ret = arg0.keys();
|
|
647
628
|
return ret;
|
|
648
629
|
},
|
|
@@ -654,18 +635,25 @@ function __wbg_get_imports() {
|
|
|
654
635
|
const ret = arg0.length;
|
|
655
636
|
return ret;
|
|
656
637
|
},
|
|
657
|
-
|
|
638
|
+
__wbg_move_9838343335ced49d: function(arg0, arg1, arg2, arg3) {
|
|
658
639
|
const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
|
|
659
640
|
return ret;
|
|
660
641
|
},
|
|
661
|
-
|
|
662
|
-
const ret =
|
|
663
|
-
|
|
642
|
+
__wbg_name_1a1b7c43667f99f5: function(arg0, arg1) {
|
|
643
|
+
const ret = arg1.name;
|
|
644
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
645
|
+
const len1 = WASM_VECTOR_LEN;
|
|
646
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
647
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
664
648
|
},
|
|
665
|
-
|
|
649
|
+
__wbg_new_11a85008814947b0: function(arg0, arg1) {
|
|
666
650
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
667
651
|
return ret;
|
|
668
652
|
},
|
|
653
|
+
__wbg_new_1da3429bc3c4541c: function(arg0) {
|
|
654
|
+
const ret = new Uint8Array(arg0);
|
|
655
|
+
return ret;
|
|
656
|
+
},
|
|
669
657
|
__wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
|
|
670
658
|
try {
|
|
671
659
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -710,18 +698,18 @@ function __wbg_get_imports() {
|
|
|
710
698
|
state0.a = 0;
|
|
711
699
|
}
|
|
712
700
|
},
|
|
713
|
-
|
|
701
|
+
__wbg_next_791a8d00715c4466: function(arg0) {
|
|
714
702
|
const ret = arg0.next();
|
|
715
703
|
return ret;
|
|
716
704
|
},
|
|
717
|
-
|
|
705
|
+
__wbg_parse_13fc413f981d786c: function() { return handleError(function (arg0, arg1) {
|
|
718
706
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
719
707
|
return ret;
|
|
720
708
|
}, arguments); },
|
|
721
709
|
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
722
710
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
723
711
|
},
|
|
724
|
-
|
|
712
|
+
__wbg_query_4f8c74fb7cf23e42: function(arg0) {
|
|
725
713
|
const ret = arg0.query();
|
|
726
714
|
return ret;
|
|
727
715
|
},
|
|
@@ -736,19 +724,19 @@ function __wbg_get_imports() {
|
|
|
736
724
|
const ret = Math.random();
|
|
737
725
|
return ret;
|
|
738
726
|
},
|
|
739
|
-
|
|
740
|
-
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2)
|
|
727
|
+
__wbg_removeEntry_3abdf44a9a4738c8: function(arg0, arg1, arg2) {
|
|
728
|
+
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
741
729
|
return ret;
|
|
742
730
|
},
|
|
743
|
-
|
|
744
|
-
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
731
|
+
__wbg_removeEntry_7914045ff1a983a4: function(arg0, arg1, arg2, arg3) {
|
|
732
|
+
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
|
|
745
733
|
return ret;
|
|
746
734
|
},
|
|
747
735
|
__wbg_rendering_new: function(arg0) {
|
|
748
736
|
const ret = Rendering.__wrap(arg0);
|
|
749
737
|
return ret;
|
|
750
738
|
},
|
|
751
|
-
|
|
739
|
+
__wbg_request_6030b3039b1ae0dc: function(arg0, arg1, arg2, arg3) {
|
|
752
740
|
const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
|
|
753
741
|
return ret;
|
|
754
742
|
},
|
|
@@ -760,17 +748,17 @@ function __wbg_get_imports() {
|
|
|
760
748
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
761
749
|
return ret;
|
|
762
750
|
}, arguments); },
|
|
763
|
-
|
|
751
|
+
__wbg_set_name_93caa23cdf04a087: function(arg0, arg1, arg2) {
|
|
764
752
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
765
753
|
},
|
|
766
|
-
|
|
754
|
+
__wbg_set_refusal_280ba8e696e1aa4c: function(arg0, arg1) {
|
|
767
755
|
arg0.refusal = arg1;
|
|
768
756
|
},
|
|
769
|
-
|
|
757
|
+
__wbg_size_ce4c161c70d82206: function(arg0) {
|
|
770
758
|
const ret = arg0.size;
|
|
771
759
|
return ret;
|
|
772
760
|
},
|
|
773
|
-
|
|
761
|
+
__wbg_slice_6f166d9c74deb2bb: function(arg0, arg1, arg2) {
|
|
774
762
|
const ret = arg0.slice(arg1, arg2);
|
|
775
763
|
return ret;
|
|
776
764
|
},
|
|
@@ -802,18 +790,21 @@ function __wbg_get_imports() {
|
|
|
802
790
|
const ret = arg0.then(arg1);
|
|
803
791
|
return ret;
|
|
804
792
|
},
|
|
805
|
-
|
|
793
|
+
__wbg_warn_6232f611e2e359d1: function(arg0, arg1) {
|
|
794
|
+
console.warn(getStringFromWasm0(arg0, arg1));
|
|
795
|
+
},
|
|
796
|
+
__wbg_write_c5dcd6f362f80fb4: function(arg0, arg1) {
|
|
806
797
|
const ret = arg0.write(arg1);
|
|
807
798
|
return ret;
|
|
808
799
|
},
|
|
809
800
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
810
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
801
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 524, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
811
802
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150);
|
|
812
803
|
return ret;
|
|
813
804
|
},
|
|
814
805
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
815
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
816
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
806
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 93, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: true }) -> Externref`.
|
|
807
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hc194386506580090);
|
|
817
808
|
return ret;
|
|
818
809
|
},
|
|
819
810
|
__wbindgen_generic_0000000000000003: function(arg0) {
|
|
@@ -842,8 +833,8 @@ function __wbg_get_imports() {
|
|
|
842
833
|
};
|
|
843
834
|
}
|
|
844
835
|
|
|
845
|
-
function
|
|
846
|
-
const ret = wasm.
|
|
836
|
+
function wasm_bindgen__convert__closures_____invoke__hc194386506580090(arg0, arg1) {
|
|
837
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__hc194386506580090(arg0, arg1);
|
|
847
838
|
return ret;
|
|
848
839
|
}
|
|
849
840
|
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|