@scalable-vector-audio/sva-wasm 0.14.17 → 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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@scalable-vector-audio/sva-wasm",
3
3
  "type": "module",
4
4
  "description": "JS bindings: a composition a page fills node by node, rendered in the browser",
5
- "version": "0.14.17",
5
+ "version": "0.14.19",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
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
- __wbg_arrayBuffer_f33a1f87899db927: function(arg0) {
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
- __wbg_close_9cfd6eb21777e7f2: function(arg0) {
676
+ __wbg_close_5cd20013e7972c42: function(arg0) {
674
677
  const ret = arg0.close();
675
678
  return ret;
676
679
  },
677
- __wbg_close_e5c8a7951edcaaad: function(arg0) {
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
- __wbg_createWritable_dcd3f18abf376afa: function(arg0) {
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
- __wbg_getDirectoryHandle_7cb5c4a46c72a09f: function(arg0, arg1, arg2, arg3) {
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
- __wbg_getFileHandle_a0f0c0a4c822b8b7: function(arg0, arg1, arg2, arg3) {
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
- __wbg_getFile_e349bf2e2144c770: function(arg0) {
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
- __wbg_keys_f0a467abbe947d49: function(arg0) {
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
- __wbg_move_092880236b31e902: function(arg0, arg1, arg2, arg3) {
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
- __wbg_name_44cecd01b1424b83: function(arg0, arg1) {
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;
@@ -794,14 +797,6 @@ function __wbg_get_imports(memory) {
794
797
  const ret = new Uint8Array(arg0);
795
798
  return ret;
796
799
  },
797
- __wbg_new_45808cdb2ce8e9b0: function() {
798
- const ret = new MessageChannel();
799
- return ret;
800
- },
801
- __wbg_new_8a2403bb417d656c: function(arg0, arg1) {
802
- const ret = new Error(getStringFromWasm0(arg0, arg1));
803
- return ret;
804
- },
805
800
  __wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
806
801
  try {
807
802
  var state0 = {a: arg0, b: arg1};
@@ -820,10 +815,18 @@ function __wbg_get_imports(memory) {
820
815
  state0.a = 0;
821
816
  }
822
817
  },
818
+ __wbg_new_90b5023f00fd5dae: function() {
819
+ const ret = new MessageChannel();
820
+ return ret;
821
+ },
823
822
  __wbg_new_bebc3f4757acf305: function() {
824
823
  const ret = new Object();
825
824
  return ret;
826
825
  },
826
+ __wbg_new_bf196fe205c10ce4: function(arg0, arg1) {
827
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
828
+ return ret;
829
+ },
827
830
  __wbg_new_ffa92086ea89f79c: function() {
828
831
  const ret = new Array();
829
832
  return ret;
@@ -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
- __wbg_next_a06eb7bf2c8cda7c: function(arg0) {
860
+ __wbg_next_38533dcc88e18634: function(arg0) {
858
861
  const ret = arg0.next();
859
862
  return ret;
860
863
  },
@@ -862,19 +865,19 @@ function __wbg_get_imports(memory) {
862
865
  const ret = Array.of(arg0, arg1, arg2);
863
866
  return ret;
864
867
  },
865
- __wbg_parse_00ae956be8ed8762: function() { return handleError(function (arg0, arg1) {
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
- __wbg_port1_baf066a95531ea80: function(arg0) {
872
+ __wbg_port1_d1e66566011cf5d6: function(arg0) {
870
873
  const ret = arg0.port1;
871
874
  return ret;
872
875
  },
873
- __wbg_port2_1ae859abafe3999d: function(arg0) {
876
+ __wbg_port2_97c25116adc33c01: function(arg0) {
874
877
  const ret = arg0.port2;
875
878
  return ret;
876
879
  },
877
- __wbg_postMessage_6275db5698f0fa05: function(arg0, arg1) {
880
+ __wbg_postMessage_05d98e1b5fb6a5e6: function(arg0, arg1) {
878
881
  arg0.postMessage(arg1);
879
882
  },
880
883
  __wbg_postMessage_8105a302ed002474: function() { return handleError(function (arg0, arg1) {
@@ -890,7 +893,7 @@ function __wbg_get_imports(memory) {
890
893
  const ret = arg0.push(arg1);
891
894
  return ret;
892
895
  },
893
- __wbg_query_9745df353368a1d8: function(arg0) {
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
- __wbg_removeEntry_1ea136af7f732ba7: function(arg0, arg1, arg2, arg3) {
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
- __wbg_removeEntry_e1fa3e03d567e4aa: function(arg0, arg1, arg2) {
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
- __wbg_request_a97f593a3dfcdf98: function(arg0, arg1, arg2, arg3) {
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
- __wbg_set_name_29ea76ea92326303: function(arg0, arg1, arg2) {
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
- __wbg_set_onmessage_36a22a436d1a7f77: function(arg0, arg1) {
944
+ __wbg_set_onmessage_4bf364c93dfb7e69: function(arg0, arg1) {
942
945
  arg0.onmessage = arg1;
943
946
  },
944
- __wbg_set_refusal_0d3f6c617458fc10: function(arg0, arg1) {
947
+ __wbg_set_refusal_980a0e509d192702: function(arg0, arg1) {
945
948
  arg0.refusal = arg1;
946
949
  },
947
- __wbg_size_805e7cbfd323f9ed: function(arg0) {
950
+ __wbg_size_8266988606a2465b: function(arg0) {
948
951
  const ret = arg0.size;
949
952
  return ret;
950
953
  },
951
- __wbg_slice_184fa1f3ab8f334d: function(arg0, arg1, arg2) {
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
- __wbg_warn_c52975f8f1f88e71: function(arg0, arg1) {
1014
+ __wbg_warn_2569b4620c2a7628: function(arg0, arg1) {
1012
1015
  console.warn(getStringFromWasm0(arg0, arg1));
1013
1016
  },
1014
- __wbg_write_cc5e4105ac47a45a: function(arg0, arg1) {
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