@scalable-vector-audio/sva-wasm 0.14.18 → 0.14.19
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 -6
- package/sva_wasm.js +42 -39
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/sva_wasm.d.ts
CHANGED
|
@@ -222,9 +222,9 @@ export class Rendering {
|
|
|
222
222
|
[Symbol.dispose](): void;
|
|
223
223
|
/**
|
|
224
224
|
* The object `sva-cli render` puts under `data`, one reading per representation asked,
|
|
225
|
-
* arrays capped as it caps.
|
|
225
|
+
* arrays capped as it caps unless `options.limit` says otherwise.
|
|
226
226
|
*/
|
|
227
|
-
representations(): any;
|
|
227
|
+
representations(options: any): any;
|
|
228
228
|
samples(channel: number): Float32Array;
|
|
229
229
|
/**
|
|
230
230
|
* Every lookup this render made of memory, and what each came to.
|
|
@@ -298,9 +298,10 @@ export class Stream {
|
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
300
|
* The object `sva-cli analyze` puts under `data` for these channels at `rate`, refusing as
|
|
301
|
-
* it refuses.
|
|
301
|
+
* it refuses. `options.limit`: how many values each array holds, or `null` for every
|
|
302
|
+
* value, as a reading `sva-cli` writes to a file.
|
|
302
303
|
*/
|
|
303
|
-
export function analyze(target: string, rate: number, channels: Array<any>, representations: string[]): any;
|
|
304
|
+
export function analyze(target: string, rate: number, channels: Array<any>, representations: string[], options: any): any;
|
|
304
305
|
|
|
305
306
|
export function initThreadPool(num_threads: number): Promise<any>;
|
|
306
307
|
|
|
@@ -339,7 +340,7 @@ export interface InitOutput {
|
|
|
339
340
|
readonly __wbg_rendering_free: (a: number, b: number) => void;
|
|
340
341
|
readonly __wbg_stream_free: (a: number, b: number) => void;
|
|
341
342
|
readonly __wbg_wbg_rayon_poolbuilder_free: (a: number, b: number) => void;
|
|
342
|
-
readonly analyze: (a: number, b: number, c: number, d: any, e: number, f: number) => [number, number, number];
|
|
343
|
+
readonly analyze: (a: number, b: number, c: number, d: any, e: number, f: number, g: any) => [number, number, number];
|
|
343
344
|
readonly composition_cache_bytes: (a: number) => number;
|
|
344
345
|
readonly composition_cache_entries: (a: number) => number;
|
|
345
346
|
readonly composition_cache_evictions: (a: number) => number;
|
|
@@ -362,7 +363,7 @@ export interface InitOutput {
|
|
|
362
363
|
readonly readings: () => [number, number, number];
|
|
363
364
|
readonly rendering_channels: (a: number) => number;
|
|
364
365
|
readonly rendering_duration_secs: (a: number) => number;
|
|
365
|
-
readonly rendering_representations: (a: number) => [number, number, number];
|
|
366
|
+
readonly rendering_representations: (a: number, b: any) => [number, number, number];
|
|
366
367
|
readonly rendering_sample_rate: (a: number) => number;
|
|
367
368
|
readonly rendering_samples: (a: number, b: number) => [number, number, number, number];
|
|
368
369
|
readonly rendering_stats: (a: number) => [number, number, number];
|
package/sva_wasm.js
CHANGED
|
@@ -223,11 +223,12 @@ export class Rendering {
|
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
225
|
* The object `sva-cli render` puts under `data`, one reading per representation asked,
|
|
226
|
-
* arrays capped as it caps.
|
|
226
|
+
* arrays capped as it caps unless `options.limit` says otherwise.
|
|
227
|
+
* @param {any} options
|
|
227
228
|
* @returns {any}
|
|
228
229
|
*/
|
|
229
|
-
representations() {
|
|
230
|
-
const ret = wasm.rendering_representations(this.__wbg_ptr);
|
|
230
|
+
representations(options) {
|
|
231
|
+
const ret = wasm.rendering_representations(this.__wbg_ptr, options);
|
|
231
232
|
if (ret[2]) {
|
|
232
233
|
throw takeFromExternrefTable0(ret[1]);
|
|
233
234
|
}
|
|
@@ -461,19 +462,21 @@ if (Symbol.dispose) Stream.prototype[Symbol.dispose] = Stream.prototype.free;
|
|
|
461
462
|
|
|
462
463
|
/**
|
|
463
464
|
* The object `sva-cli analyze` puts under `data` for these channels at `rate`, refusing as
|
|
464
|
-
* it refuses.
|
|
465
|
+
* it refuses. `options.limit`: how many values each array holds, or `null` for every
|
|
466
|
+
* value, as a reading `sva-cli` writes to a file.
|
|
465
467
|
* @param {string} target
|
|
466
468
|
* @param {number} rate
|
|
467
469
|
* @param {Array<any>} channels
|
|
468
470
|
* @param {string[]} representations
|
|
471
|
+
* @param {any} options
|
|
469
472
|
* @returns {any}
|
|
470
473
|
*/
|
|
471
|
-
export function analyze(target, rate, channels, representations) {
|
|
474
|
+
export function analyze(target, rate, channels, representations, options) {
|
|
472
475
|
const ptr0 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
473
476
|
const len0 = WASM_VECTOR_LEN;
|
|
474
477
|
const ptr1 = passArrayJsValueToWasm0(representations, wasm.__wbindgen_malloc);
|
|
475
478
|
const len1 = WASM_VECTOR_LEN;
|
|
476
|
-
const ret = wasm.analyze(ptr0, len0, rate, channels, ptr1, len1);
|
|
479
|
+
const ret = wasm.analyze(ptr0, len0, rate, channels, ptr1, len1, options);
|
|
477
480
|
if (ret[2]) {
|
|
478
481
|
throw takeFromExternrefTable0(ret[1]);
|
|
479
482
|
}
|
|
@@ -650,7 +653,7 @@ function __wbg_get_imports(memory) {
|
|
|
650
653
|
__wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
|
|
651
654
|
arg0._wbg_cb_unref();
|
|
652
655
|
},
|
|
653
|
-
|
|
656
|
+
__wbg_arrayBuffer_f365fd580ffa1c92: function(arg0) {
|
|
654
657
|
const ret = arg0.arrayBuffer();
|
|
655
658
|
return ret;
|
|
656
659
|
},
|
|
@@ -670,18 +673,18 @@ function __wbg_get_imports(memory) {
|
|
|
670
673
|
const ret = arg0.call(arg1, arg2);
|
|
671
674
|
return ret;
|
|
672
675
|
}, arguments); },
|
|
673
|
-
|
|
676
|
+
__wbg_close_5cd20013e7972c42: function(arg0) {
|
|
674
677
|
const ret = arg0.close();
|
|
675
678
|
return ret;
|
|
676
679
|
},
|
|
677
|
-
|
|
680
|
+
__wbg_close_ca83fbed995e2e01: function(arg0) {
|
|
678
681
|
arg0.close();
|
|
679
682
|
},
|
|
680
683
|
__wbg_composition_new: function(arg0) {
|
|
681
684
|
const ret = Composition.__wrap(arg0);
|
|
682
685
|
return ret;
|
|
683
686
|
},
|
|
684
|
-
|
|
687
|
+
__wbg_createWritable_48566cc7e2a7a3c2: function(arg0) {
|
|
685
688
|
const ret = arg0.createWritable();
|
|
686
689
|
return ret;
|
|
687
690
|
},
|
|
@@ -697,15 +700,15 @@ function __wbg_get_imports(memory) {
|
|
|
697
700
|
const ret = Array.from(arg0);
|
|
698
701
|
return ret;
|
|
699
702
|
},
|
|
700
|
-
|
|
703
|
+
__wbg_getDirectoryHandle_add98c3ed0bcb1e5: function(arg0, arg1, arg2, arg3) {
|
|
701
704
|
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
702
705
|
return ret;
|
|
703
706
|
},
|
|
704
|
-
|
|
707
|
+
__wbg_getFileHandle_50a8e51835eb1893: function(arg0, arg1, arg2, arg3) {
|
|
705
708
|
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
706
709
|
return ret;
|
|
707
710
|
},
|
|
708
|
-
|
|
711
|
+
__wbg_getFile_00276f661752b0d7: function(arg0) {
|
|
709
712
|
const ret = arg0.getFile();
|
|
710
713
|
return ret;
|
|
711
714
|
},
|
|
@@ -759,7 +762,7 @@ function __wbg_get_imports(memory) {
|
|
|
759
762
|
const ret = Array.isArray(arg0);
|
|
760
763
|
return ret;
|
|
761
764
|
},
|
|
762
|
-
|
|
765
|
+
__wbg_keys_143bcb9163ce7059: function(arg0) {
|
|
763
766
|
const ret = arg0.keys();
|
|
764
767
|
return ret;
|
|
765
768
|
},
|
|
@@ -775,11 +778,11 @@ function __wbg_get_imports(memory) {
|
|
|
775
778
|
const ret = arg0.length;
|
|
776
779
|
return ret;
|
|
777
780
|
},
|
|
778
|
-
|
|
781
|
+
__wbg_move_e01680a9e2f56ad2: function(arg0, arg1, arg2, arg3) {
|
|
779
782
|
const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
|
|
780
783
|
return ret;
|
|
781
784
|
},
|
|
782
|
-
|
|
785
|
+
__wbg_name_334a3c5f2443d864: function(arg0, arg1) {
|
|
783
786
|
const ret = arg1.name;
|
|
784
787
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
785
788
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -812,16 +815,16 @@ function __wbg_get_imports(memory) {
|
|
|
812
815
|
state0.a = 0;
|
|
813
816
|
}
|
|
814
817
|
},
|
|
815
|
-
|
|
816
|
-
const ret = new
|
|
818
|
+
__wbg_new_90b5023f00fd5dae: function() {
|
|
819
|
+
const ret = new MessageChannel();
|
|
817
820
|
return ret;
|
|
818
821
|
},
|
|
819
822
|
__wbg_new_bebc3f4757acf305: function() {
|
|
820
823
|
const ret = new Object();
|
|
821
824
|
return ret;
|
|
822
825
|
},
|
|
823
|
-
|
|
824
|
-
const ret = new
|
|
826
|
+
__wbg_new_bf196fe205c10ce4: function(arg0, arg1) {
|
|
827
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
825
828
|
return ret;
|
|
826
829
|
},
|
|
827
830
|
__wbg_new_ffa92086ea89f79c: function() {
|
|
@@ -854,7 +857,7 @@ function __wbg_get_imports(memory) {
|
|
|
854
857
|
const ret = new Worker(getStringFromWasm0(arg0, arg1));
|
|
855
858
|
return ret;
|
|
856
859
|
},
|
|
857
|
-
|
|
860
|
+
__wbg_next_38533dcc88e18634: function(arg0) {
|
|
858
861
|
const ret = arg0.next();
|
|
859
862
|
return ret;
|
|
860
863
|
},
|
|
@@ -862,24 +865,24 @@ function __wbg_get_imports(memory) {
|
|
|
862
865
|
const ret = Array.of(arg0, arg1, arg2);
|
|
863
866
|
return ret;
|
|
864
867
|
},
|
|
865
|
-
|
|
868
|
+
__wbg_parse_d26e3971af323908: function() { return handleError(function (arg0, arg1) {
|
|
866
869
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
867
870
|
return ret;
|
|
868
871
|
}, arguments); },
|
|
869
|
-
|
|
872
|
+
__wbg_port1_d1e66566011cf5d6: function(arg0) {
|
|
870
873
|
const ret = arg0.port1;
|
|
871
874
|
return ret;
|
|
872
875
|
},
|
|
873
|
-
|
|
876
|
+
__wbg_port2_97c25116adc33c01: function(arg0) {
|
|
874
877
|
const ret = arg0.port2;
|
|
875
878
|
return ret;
|
|
876
879
|
},
|
|
880
|
+
__wbg_postMessage_05d98e1b5fb6a5e6: function(arg0, arg1) {
|
|
881
|
+
arg0.postMessage(arg1);
|
|
882
|
+
},
|
|
877
883
|
__wbg_postMessage_8105a302ed002474: function() { return handleError(function (arg0, arg1) {
|
|
878
884
|
arg0.postMessage(arg1);
|
|
879
885
|
}, arguments); },
|
|
880
|
-
__wbg_postMessage_d8c8253ecbb41e69: function(arg0, arg1) {
|
|
881
|
-
arg0.postMessage(arg1);
|
|
882
|
-
},
|
|
883
886
|
__wbg_prototypesetcall_804a1eb1b047ccb9: function(arg0, arg1, arg2) {
|
|
884
887
|
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
|
|
885
888
|
},
|
|
@@ -890,7 +893,7 @@ function __wbg_get_imports(memory) {
|
|
|
890
893
|
const ret = arg0.push(arg1);
|
|
891
894
|
return ret;
|
|
892
895
|
},
|
|
893
|
-
|
|
896
|
+
__wbg_query_bb29a13e5e5c0b71: function(arg0) {
|
|
894
897
|
const ret = arg0.query();
|
|
895
898
|
return ret;
|
|
896
899
|
},
|
|
@@ -905,11 +908,11 @@ function __wbg_get_imports(memory) {
|
|
|
905
908
|
const ret = Math.random();
|
|
906
909
|
return ret;
|
|
907
910
|
},
|
|
908
|
-
|
|
911
|
+
__wbg_removeEntry_def05bd290316e64: function(arg0, arg1, arg2, arg3) {
|
|
909
912
|
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
|
|
910
913
|
return ret;
|
|
911
914
|
},
|
|
912
|
-
|
|
915
|
+
__wbg_removeEntry_f2b2235439b08db2: function(arg0, arg1, arg2) {
|
|
913
916
|
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
914
917
|
return ret;
|
|
915
918
|
},
|
|
@@ -917,7 +920,7 @@ function __wbg_get_imports(memory) {
|
|
|
917
920
|
const ret = Rendering.__wrap(arg0);
|
|
918
921
|
return ret;
|
|
919
922
|
},
|
|
920
|
-
|
|
923
|
+
__wbg_request_779634d0b0a144df: function(arg0, arg1, arg2, arg3) {
|
|
921
924
|
const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
|
|
922
925
|
return ret;
|
|
923
926
|
},
|
|
@@ -932,23 +935,23 @@ function __wbg_get_imports(memory) {
|
|
|
932
935
|
__wbg_set_c41f8dbc07a2190f: function(arg0, arg1, arg2) {
|
|
933
936
|
arg0.set(getArrayF32FromWasm0(arg1, arg2));
|
|
934
937
|
},
|
|
935
|
-
|
|
938
|
+
__wbg_set_name_8240acd4f45229dd: function(arg0, arg1, arg2) {
|
|
936
939
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
937
940
|
},
|
|
938
|
-
|
|
941
|
+
__wbg_set_onmessage_2244c2525c4e0c38: function(arg0, arg1) {
|
|
939
942
|
arg0.onmessage = arg1;
|
|
940
943
|
},
|
|
941
|
-
|
|
944
|
+
__wbg_set_onmessage_4bf364c93dfb7e69: function(arg0, arg1) {
|
|
942
945
|
arg0.onmessage = arg1;
|
|
943
946
|
},
|
|
944
|
-
|
|
947
|
+
__wbg_set_refusal_980a0e509d192702: function(arg0, arg1) {
|
|
945
948
|
arg0.refusal = arg1;
|
|
946
949
|
},
|
|
947
|
-
|
|
950
|
+
__wbg_size_8266988606a2465b: function(arg0) {
|
|
948
951
|
const ret = arg0.size;
|
|
949
952
|
return ret;
|
|
950
953
|
},
|
|
951
|
-
|
|
954
|
+
__wbg_slice_89649fead5d0a65f: function(arg0, arg1, arg2) {
|
|
952
955
|
const ret = arg0.slice(arg1, arg2);
|
|
953
956
|
return ret;
|
|
954
957
|
},
|
|
@@ -1008,10 +1011,10 @@ function __wbg_get_imports(memory) {
|
|
|
1008
1011
|
const ret = Atomics.waitAsync;
|
|
1009
1012
|
return ret;
|
|
1010
1013
|
},
|
|
1011
|
-
|
|
1014
|
+
__wbg_warn_2569b4620c2a7628: function(arg0, arg1) {
|
|
1012
1015
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
1013
1016
|
},
|
|
1014
|
-
|
|
1017
|
+
__wbg_write_b3d60f38c3824b10: function(arg0, arg1) {
|
|
1015
1018
|
const ret = arg0.write(arg1);
|
|
1016
1019
|
return ret;
|
|
1017
1020
|
},
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|