@scalable-vector-audio/sva-wasm 0.7.16 → 0.7.18
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 +13 -5
- package/sva_wasm.js +62 -45
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/sva_wasm.d.ts
CHANGED
|
@@ -12,9 +12,10 @@ export class Composition {
|
|
|
12
12
|
constructor(name?: string | null);
|
|
13
13
|
/**
|
|
14
14
|
* Memory over the store in `dir`, an origin-private file system directory; alone where
|
|
15
|
-
* none opens.
|
|
15
|
+
* none opens. `options.store_max_bytes`: the store's budget, evicting the least recently
|
|
16
|
+
* used past it at each persist.
|
|
16
17
|
*/
|
|
17
|
-
static open(name
|
|
18
|
+
static open(name: string | null | undefined, dir: FileSystemDirectoryHandle | null | undefined, options: any): Promise<Composition>;
|
|
18
19
|
/**
|
|
19
20
|
* The only commit to the directory `open` was handed.
|
|
20
21
|
*/
|
|
@@ -34,6 +35,11 @@ export class Composition {
|
|
|
34
35
|
readonly cache_entries: number;
|
|
35
36
|
readonly cache_evictions: number;
|
|
36
37
|
cache_max_bytes: number;
|
|
38
|
+
/**
|
|
39
|
+
* What the store holds by its index; undefined without one.
|
|
40
|
+
*/
|
|
41
|
+
readonly store_bytes: number | undefined;
|
|
42
|
+
readonly store_max_bytes: number | undefined;
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
export class Rendering {
|
|
@@ -129,10 +135,12 @@ export interface InitOutput {
|
|
|
129
135
|
readonly composition_counters: (a: number) => [number, number, number];
|
|
130
136
|
readonly composition_insert: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
131
137
|
readonly composition_new: (a: number, b: number) => number;
|
|
132
|
-
readonly composition_open: (a: number, b: number, c: number) => any;
|
|
138
|
+
readonly composition_open: (a: number, b: number, c: number, d: any) => any;
|
|
133
139
|
readonly composition_persist: (a: number) => any;
|
|
134
140
|
readonly composition_render: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
135
141
|
readonly composition_set_cache_max_bytes: (a: number, b: number) => void;
|
|
142
|
+
readonly composition_store_bytes: (a: number) => [number, number];
|
|
143
|
+
readonly composition_store_max_bytes: (a: number) => [number, number];
|
|
136
144
|
readonly composition_stream: (a: number, b: number, c: number, d: number, e: any) => any;
|
|
137
145
|
readonly rendering_channels: (a: number) => number;
|
|
138
146
|
readonly rendering_duration_secs: (a: number) => number;
|
|
@@ -159,8 +167,8 @@ export interface InitOutput {
|
|
|
159
167
|
readonly stream_work: (a: number) => [number, number, number];
|
|
160
168
|
readonly wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95: (a: number, b: number, c: any, d: any) => void;
|
|
161
169
|
readonly wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150: (a: number, b: number, c: any) => [number, number];
|
|
162
|
-
readonly
|
|
163
|
-
readonly
|
|
170
|
+
readonly wasm_bindgen__convert__closures_____invoke__h54d79f6d11af2311: (a: number, b: number) => any;
|
|
171
|
+
readonly wasm_bindgen__convert__closures_____invoke__hebd8072cc64c80ed: (a: number, b: number) => void;
|
|
164
172
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
165
173
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
166
174
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/sva_wasm.js
CHANGED
|
@@ -80,15 +80,17 @@ export class Composition {
|
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
82
|
* Memory over the store in `dir`, an origin-private file system directory; alone where
|
|
83
|
-
* none opens.
|
|
84
|
-
*
|
|
85
|
-
* @param {
|
|
83
|
+
* none opens. `options.store_max_bytes`: the store's budget, evicting the least recently
|
|
84
|
+
* used past it at each persist.
|
|
85
|
+
* @param {string | null | undefined} name
|
|
86
|
+
* @param {FileSystemDirectoryHandle | null | undefined} dir
|
|
87
|
+
* @param {any} options
|
|
86
88
|
* @returns {Promise<Composition>}
|
|
87
89
|
*/
|
|
88
|
-
static open(name, dir) {
|
|
90
|
+
static open(name, dir, options) {
|
|
89
91
|
var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
90
92
|
var len0 = WASM_VECTOR_LEN;
|
|
91
|
-
const ret = wasm.composition_open(ptr0, len0, isLikeNone(dir) ? 0 : addToExternrefTable0(dir));
|
|
93
|
+
const ret = wasm.composition_open(ptr0, len0, isLikeNone(dir) ? 0 : addToExternrefTable0(dir), options);
|
|
92
94
|
return ret;
|
|
93
95
|
}
|
|
94
96
|
/**
|
|
@@ -123,6 +125,21 @@ export class Composition {
|
|
|
123
125
|
set cache_max_bytes(max_bytes) {
|
|
124
126
|
wasm.composition_set_cache_max_bytes(this.__wbg_ptr, max_bytes);
|
|
125
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* What the store holds by its index; undefined without one.
|
|
130
|
+
* @returns {number | undefined}
|
|
131
|
+
*/
|
|
132
|
+
get store_bytes() {
|
|
133
|
+
const ret = wasm.composition_store_bytes(this.__wbg_ptr);
|
|
134
|
+
return ret[0] === 0 ? undefined : ret[1];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @returns {number | undefined}
|
|
138
|
+
*/
|
|
139
|
+
get store_max_bytes() {
|
|
140
|
+
const ret = wasm.composition_store_max_bytes(this.__wbg_ptr);
|
|
141
|
+
return ret[0] === 0 ? undefined : ret[1];
|
|
142
|
+
}
|
|
126
143
|
/**
|
|
127
144
|
* `target` block by block. `options`: `rate`, `bits`, `until`, `live`, `channels`.
|
|
128
145
|
* @param {string} target
|
|
@@ -457,7 +474,7 @@ function __wbg_get_imports() {
|
|
|
457
474
|
__wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
|
|
458
475
|
arg0._wbg_cb_unref();
|
|
459
476
|
},
|
|
460
|
-
|
|
477
|
+
__wbg_arrayBuffer_9159b5cfbd119cb1: function(arg0) {
|
|
461
478
|
const ret = arg0.arrayBuffer();
|
|
462
479
|
return ret;
|
|
463
480
|
},
|
|
@@ -469,10 +486,10 @@ function __wbg_get_imports() {
|
|
|
469
486
|
const ret = arg0.call(arg1, arg2);
|
|
470
487
|
return ret;
|
|
471
488
|
}, arguments); },
|
|
472
|
-
|
|
489
|
+
__wbg_close_513ff14225dbbcc1: function(arg0) {
|
|
473
490
|
arg0.close();
|
|
474
491
|
},
|
|
475
|
-
|
|
492
|
+
__wbg_close_e5bfe4d6a87b6dd0: function(arg0) {
|
|
476
493
|
const ret = arg0.close();
|
|
477
494
|
return ret;
|
|
478
495
|
},
|
|
@@ -480,7 +497,7 @@ function __wbg_get_imports() {
|
|
|
480
497
|
const ret = Composition.__wrap(arg0);
|
|
481
498
|
return ret;
|
|
482
499
|
},
|
|
483
|
-
|
|
500
|
+
__wbg_createWritable_e2b6a5a20af70320: function(arg0) {
|
|
484
501
|
const ret = arg0.createWritable();
|
|
485
502
|
return ret;
|
|
486
503
|
},
|
|
@@ -492,15 +509,15 @@ function __wbg_get_imports() {
|
|
|
492
509
|
const ret = Array.from(arg0);
|
|
493
510
|
return ret;
|
|
494
511
|
},
|
|
495
|
-
|
|
512
|
+
__wbg_getDirectoryHandle_61b8e273cbee237e: function(arg0, arg1, arg2, arg3) {
|
|
496
513
|
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
497
514
|
return ret;
|
|
498
515
|
},
|
|
499
|
-
|
|
516
|
+
__wbg_getFileHandle_0302fa73add13434: function(arg0, arg1, arg2, arg3) {
|
|
500
517
|
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
501
518
|
return ret;
|
|
502
519
|
},
|
|
503
|
-
|
|
520
|
+
__wbg_getFile_b8649555a1bc684a: function(arg0) {
|
|
504
521
|
const ret = arg0.getFile();
|
|
505
522
|
return ret;
|
|
506
523
|
},
|
|
@@ -534,7 +551,7 @@ function __wbg_get_imports() {
|
|
|
534
551
|
const ret = Array.isArray(arg0);
|
|
535
552
|
return ret;
|
|
536
553
|
},
|
|
537
|
-
|
|
554
|
+
__wbg_keys_c29cfc0a79d08e3b: function(arg0) {
|
|
538
555
|
const ret = arg0.keys();
|
|
539
556
|
return ret;
|
|
540
557
|
},
|
|
@@ -550,11 +567,11 @@ function __wbg_get_imports() {
|
|
|
550
567
|
const ret = arg0.length;
|
|
551
568
|
return ret;
|
|
552
569
|
},
|
|
553
|
-
|
|
570
|
+
__wbg_move_85394dbb60cb5e25: function(arg0, arg1, arg2, arg3) {
|
|
554
571
|
const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
|
|
555
572
|
return ret;
|
|
556
573
|
},
|
|
557
|
-
|
|
574
|
+
__wbg_name_db881f36dd258fcf: function(arg0, arg1) {
|
|
558
575
|
const ret = arg1.name;
|
|
559
576
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
560
577
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -565,10 +582,6 @@ function __wbg_get_imports() {
|
|
|
565
582
|
const ret = new Uint8Array(arg0);
|
|
566
583
|
return ret;
|
|
567
584
|
},
|
|
568
|
-
__wbg_new_6db8ea94d4c5e1ff: function() {
|
|
569
|
-
const ret = new MessageChannel();
|
|
570
|
-
return ret;
|
|
571
|
-
},
|
|
572
585
|
__wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
|
|
573
586
|
try {
|
|
574
587
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -591,10 +604,14 @@ function __wbg_get_imports() {
|
|
|
591
604
|
const ret = new Object();
|
|
592
605
|
return ret;
|
|
593
606
|
},
|
|
594
|
-
|
|
607
|
+
__wbg_new_c44fbf6b4a1f2c4e: function(arg0, arg1) {
|
|
595
608
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
596
609
|
return ret;
|
|
597
610
|
},
|
|
611
|
+
__wbg_new_f84fbc90be27fea9: function() {
|
|
612
|
+
const ret = new MessageChannel();
|
|
613
|
+
return ret;
|
|
614
|
+
},
|
|
598
615
|
__wbg_new_from_slice_4ee02165f9de919e: function(arg0, arg1) {
|
|
599
616
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
600
617
|
return ret;
|
|
@@ -617,29 +634,29 @@ function __wbg_get_imports() {
|
|
|
617
634
|
state0.a = 0;
|
|
618
635
|
}
|
|
619
636
|
},
|
|
620
|
-
|
|
637
|
+
__wbg_next_9236a1e2488549f4: function(arg0) {
|
|
621
638
|
const ret = arg0.next();
|
|
622
639
|
return ret;
|
|
623
640
|
},
|
|
624
|
-
|
|
641
|
+
__wbg_parse_1c7f06f8eaab3a14: function() { return handleError(function (arg0, arg1) {
|
|
625
642
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
626
643
|
return ret;
|
|
627
644
|
}, arguments); },
|
|
628
|
-
|
|
645
|
+
__wbg_port1_54271c4345f51409: function(arg0) {
|
|
629
646
|
const ret = arg0.port1;
|
|
630
647
|
return ret;
|
|
631
648
|
},
|
|
632
|
-
|
|
649
|
+
__wbg_port2_fbd6f51c46f5da14: function(arg0) {
|
|
633
650
|
const ret = arg0.port2;
|
|
634
651
|
return ret;
|
|
635
652
|
},
|
|
636
|
-
|
|
653
|
+
__wbg_postMessage_687cfe884c5a6c24: function(arg0, arg1) {
|
|
637
654
|
arg0.postMessage(arg1);
|
|
638
655
|
},
|
|
639
656
|
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
640
657
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
641
658
|
},
|
|
642
|
-
|
|
659
|
+
__wbg_query_7d03acca215c7259: function(arg0) {
|
|
643
660
|
const ret = arg0.query();
|
|
644
661
|
return ret;
|
|
645
662
|
},
|
|
@@ -654,11 +671,11 @@ function __wbg_get_imports() {
|
|
|
654
671
|
const ret = Math.random();
|
|
655
672
|
return ret;
|
|
656
673
|
},
|
|
657
|
-
|
|
674
|
+
__wbg_removeEntry_557507b786a1a088: function(arg0, arg1, arg2, arg3) {
|
|
658
675
|
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
|
|
659
676
|
return ret;
|
|
660
677
|
},
|
|
661
|
-
|
|
678
|
+
__wbg_removeEntry_86ca3824e69763f3: function(arg0, arg1, arg2) {
|
|
662
679
|
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
663
680
|
return ret;
|
|
664
681
|
},
|
|
@@ -666,7 +683,7 @@ function __wbg_get_imports() {
|
|
|
666
683
|
const ret = Rendering.__wrap(arg0);
|
|
667
684
|
return ret;
|
|
668
685
|
},
|
|
669
|
-
|
|
686
|
+
__wbg_request_4f7ba662dfea46cd: function(arg0, arg1, arg2, arg3) {
|
|
670
687
|
const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
|
|
671
688
|
return ret;
|
|
672
689
|
},
|
|
@@ -681,20 +698,20 @@ function __wbg_get_imports() {
|
|
|
681
698
|
__wbg_set_c41f8dbc07a2190f: function(arg0, arg1, arg2) {
|
|
682
699
|
arg0.set(getArrayF32FromWasm0(arg1, arg2));
|
|
683
700
|
},
|
|
684
|
-
|
|
701
|
+
__wbg_set_name_6af6676ad69d47be: function(arg0, arg1, arg2) {
|
|
685
702
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
686
703
|
},
|
|
687
|
-
|
|
704
|
+
__wbg_set_onmessage_dc5d701819b140c9: function(arg0, arg1) {
|
|
688
705
|
arg0.onmessage = arg1;
|
|
689
706
|
},
|
|
690
|
-
|
|
707
|
+
__wbg_set_refusal_adc06750a46fdb14: function(arg0, arg1) {
|
|
691
708
|
arg0.refusal = arg1;
|
|
692
709
|
},
|
|
693
|
-
|
|
710
|
+
__wbg_size_92e6c078a6013508: function(arg0) {
|
|
694
711
|
const ret = arg0.size;
|
|
695
712
|
return ret;
|
|
696
713
|
},
|
|
697
|
-
|
|
714
|
+
__wbg_slice_aeb2401e283e0cf2: function(arg0, arg1, arg2) {
|
|
698
715
|
const ret = arg0.slice(arg1, arg2);
|
|
699
716
|
return ret;
|
|
700
717
|
},
|
|
@@ -730,26 +747,26 @@ function __wbg_get_imports() {
|
|
|
730
747
|
const ret = arg0.then(arg1);
|
|
731
748
|
return ret;
|
|
732
749
|
},
|
|
733
|
-
|
|
750
|
+
__wbg_warn_c020562a4c3c7703: function(arg0, arg1) {
|
|
734
751
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
735
752
|
},
|
|
736
|
-
|
|
753
|
+
__wbg_write_00795fbddc23319f: function(arg0, arg1) {
|
|
737
754
|
const ret = arg0.write(arg1);
|
|
738
755
|
return ret;
|
|
739
756
|
},
|
|
740
757
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
741
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
758
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 745, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
742
759
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150);
|
|
743
760
|
return ret;
|
|
744
761
|
},
|
|
745
762
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
746
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
747
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
763
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 95, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: true }) -> Externref`.
|
|
764
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h54d79f6d11af2311);
|
|
748
765
|
return ret;
|
|
749
766
|
},
|
|
750
767
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
751
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
752
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
768
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 97, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
769
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hebd8072cc64c80ed);
|
|
753
770
|
return ret;
|
|
754
771
|
},
|
|
755
772
|
__wbindgen_generic_0000000000000004: function(arg0) {
|
|
@@ -778,12 +795,12 @@ function __wbg_get_imports() {
|
|
|
778
795
|
};
|
|
779
796
|
}
|
|
780
797
|
|
|
781
|
-
function
|
|
782
|
-
wasm.
|
|
798
|
+
function wasm_bindgen__convert__closures_____invoke__hebd8072cc64c80ed(arg0, arg1) {
|
|
799
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hebd8072cc64c80ed(arg0, arg1);
|
|
783
800
|
}
|
|
784
801
|
|
|
785
|
-
function
|
|
786
|
-
const ret = wasm.
|
|
802
|
+
function wasm_bindgen__convert__closures_____invoke__h54d79f6d11af2311(arg0, arg1) {
|
|
803
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h54d79f6d11af2311(arg0, arg1);
|
|
787
804
|
return ret;
|
|
788
805
|
}
|
|
789
806
|
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|