@scalable-vector-audio/sva-wasm 0.14.12 → 0.14.14

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.12",
5
+ "version": "0.14.14",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
package/sva_wasm.d.ts CHANGED
@@ -296,6 +296,12 @@ export class Stream {
296
296
  readonly sample_rate: number;
297
297
  }
298
298
 
299
+ /**
300
+ * The object `sva-cli analyze` puts under `data` for these channels at `rate`, refusing as
301
+ * it refuses.
302
+ */
303
+ export function analyze(target: string, rate: number, channels: Array<any>, representations: string[]): any;
304
+
299
305
  export function initThreadPool(num_threads: number): Promise<any>;
300
306
 
301
307
  /**
@@ -333,6 +339,7 @@ export interface InitOutput {
333
339
  readonly __wbg_rendering_free: (a: number, b: number) => void;
334
340
  readonly __wbg_stream_free: (a: number, b: number) => void;
335
341
  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];
336
343
  readonly composition_cache_bytes: (a: number) => number;
337
344
  readonly composition_cache_entries: (a: number) => number;
338
345
  readonly composition_cache_evictions: (a: number) => number;
package/sva_wasm.js CHANGED
@@ -459,6 +459,27 @@ export class Stream {
459
459
  }
460
460
  if (Symbol.dispose) Stream.prototype[Symbol.dispose] = Stream.prototype.free;
461
461
 
462
+ /**
463
+ * The object `sva-cli analyze` puts under `data` for these channels at `rate`, refusing as
464
+ * it refuses.
465
+ * @param {string} target
466
+ * @param {number} rate
467
+ * @param {Array<any>} channels
468
+ * @param {string[]} representations
469
+ * @returns {any}
470
+ */
471
+ export function analyze(target, rate, channels, representations) {
472
+ const ptr0 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
473
+ const len0 = WASM_VECTOR_LEN;
474
+ const ptr1 = passArrayJsValueToWasm0(representations, wasm.__wbindgen_malloc);
475
+ const len1 = WASM_VECTOR_LEN;
476
+ const ret = wasm.analyze(ptr0, len0, rate, channels, ptr1, len1);
477
+ if (ret[2]) {
478
+ throw takeFromExternrefTable0(ret[1]);
479
+ }
480
+ return takeFromExternrefTable0(ret[0]);
481
+ }
482
+
462
483
  /**
463
484
  * @param {number} num_threads
464
485
  * @returns {Promise<any>}
@@ -629,7 +650,7 @@ function __wbg_get_imports(memory) {
629
650
  __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
630
651
  arg0._wbg_cb_unref();
631
652
  },
632
- __wbg_arrayBuffer_b0373b67c8f08088: function(arg0) {
653
+ __wbg_arrayBuffer_8c3a9673af523019: function(arg0) {
633
654
  const ret = arg0.arrayBuffer();
634
655
  return ret;
635
656
  },
@@ -649,18 +670,18 @@ function __wbg_get_imports(memory) {
649
670
  const ret = arg0.call(arg1, arg2);
650
671
  return ret;
651
672
  }, arguments); },
652
- __wbg_close_909fdd7090b30eb6: function(arg0) {
653
- arg0.close();
654
- },
655
- __wbg_close_b52021c69f4097bb: function(arg0) {
673
+ __wbg_close_735f762032294066: function(arg0) {
656
674
  const ret = arg0.close();
657
675
  return ret;
658
676
  },
677
+ __wbg_close_b5b43b00eca9d8f4: function(arg0) {
678
+ arg0.close();
679
+ },
659
680
  __wbg_composition_new: function(arg0) {
660
681
  const ret = Composition.__wrap(arg0);
661
682
  return ret;
662
683
  },
663
- __wbg_createWritable_1c4e9f6dd7de4780: function(arg0) {
684
+ __wbg_createWritable_c35859511dc349a6: function(arg0) {
664
685
  const ret = arg0.createWritable();
665
686
  return ret;
666
687
  },
@@ -676,15 +697,15 @@ function __wbg_get_imports(memory) {
676
697
  const ret = Array.from(arg0);
677
698
  return ret;
678
699
  },
679
- __wbg_getDirectoryHandle_76acc59d9ba96453: function(arg0, arg1, arg2, arg3) {
700
+ __wbg_getDirectoryHandle_fe952928a44866df: function(arg0, arg1, arg2, arg3) {
680
701
  const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
681
702
  return ret;
682
703
  },
683
- __wbg_getFileHandle_bd687326b0b8b407: function(arg0, arg1, arg2, arg3) {
704
+ __wbg_getFileHandle_74bfaa9ebc60b640: function(arg0, arg1, arg2, arg3) {
684
705
  const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
685
706
  return ret;
686
707
  },
687
- __wbg_getFile_481bef43e2b146fe: function(arg0) {
708
+ __wbg_getFile_4af285fa9cb56f24: function(arg0) {
688
709
  const ret = arg0.getFile();
689
710
  return ret;
690
711
  },
@@ -704,6 +725,16 @@ function __wbg_get_imports(memory) {
704
725
  const ret = Reflect.has(arg0, arg1);
705
726
  return ret;
706
727
  }, arguments); },
728
+ __wbg_instanceof_Float32Array_31e80d3e88752523: function(arg0) {
729
+ let result;
730
+ try {
731
+ result = arg0 instanceof Float32Array;
732
+ } catch (_) {
733
+ result = false;
734
+ }
735
+ const ret = result;
736
+ return ret;
737
+ },
707
738
  __wbg_instanceof_Object_87732cb922ac2e2c: function(arg0) {
708
739
  let result;
709
740
  try {
@@ -728,7 +759,7 @@ function __wbg_get_imports(memory) {
728
759
  const ret = Array.isArray(arg0);
729
760
  return ret;
730
761
  },
731
- __wbg_keys_d7da13fb21e2b680: function(arg0) {
762
+ __wbg_keys_293d7309f83978c6: function(arg0) {
732
763
  const ret = arg0.keys();
733
764
  return ret;
734
765
  },
@@ -744,11 +775,11 @@ function __wbg_get_imports(memory) {
744
775
  const ret = arg0.length;
745
776
  return ret;
746
777
  },
747
- __wbg_move_5a18af86de8f29a1: function(arg0, arg1, arg2, arg3) {
778
+ __wbg_move_cc5c6e7070a636ba: function(arg0, arg1, arg2, arg3) {
748
779
  const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
749
780
  return ret;
750
781
  },
751
- __wbg_name_c5d7a2bd2091b7fb: function(arg0, arg1) {
782
+ __wbg_name_445979b8e47cd57f: function(arg0, arg1) {
752
783
  const ret = arg1.name;
753
784
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
754
785
  const len1 = WASM_VECTOR_LEN;
@@ -763,14 +794,10 @@ function __wbg_get_imports(memory) {
763
794
  const ret = new Uint8Array(arg0);
764
795
  return ret;
765
796
  },
766
- __wbg_new_4c229487c1f1c5a0: function() {
797
+ __wbg_new_696a9309e753dcf6: function() {
767
798
  const ret = new MessageChannel();
768
799
  return ret;
769
800
  },
770
- __wbg_new_6e4574b169a6101f: function(arg0, arg1) {
771
- const ret = new Error(getStringFromWasm0(arg0, arg1));
772
- return ret;
773
- },
774
801
  __wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
775
802
  try {
776
803
  var state0 = {a: arg0, b: arg1};
@@ -793,6 +820,10 @@ function __wbg_get_imports(memory) {
793
820
  const ret = new Object();
794
821
  return ret;
795
822
  },
823
+ __wbg_new_e422ea0a42490008: function(arg0, arg1) {
824
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
825
+ return ret;
826
+ },
796
827
  __wbg_new_ffa92086ea89f79c: function() {
797
828
  const ret = new Array();
798
829
  return ret;
@@ -823,7 +854,7 @@ function __wbg_get_imports(memory) {
823
854
  const ret = new Worker(getStringFromWasm0(arg0, arg1));
824
855
  return ret;
825
856
  },
826
- __wbg_next_b1bf9e4ada258684: function(arg0) {
857
+ __wbg_next_9cbbd58078bac069: function(arg0) {
827
858
  const ret = arg0.next();
828
859
  return ret;
829
860
  },
@@ -831,24 +862,27 @@ function __wbg_get_imports(memory) {
831
862
  const ret = Array.of(arg0, arg1, arg2);
832
863
  return ret;
833
864
  },
834
- __wbg_parse_2980c145a938c8fb: function() { return handleError(function (arg0, arg1) {
865
+ __wbg_parse_1a1c8a97687314b1: function() { return handleError(function (arg0, arg1) {
835
866
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
836
867
  return ret;
837
868
  }, arguments); },
838
- __wbg_port1_1e9703be8fea706a: function(arg0) {
869
+ __wbg_port1_8d6444e304c52989: function(arg0) {
839
870
  const ret = arg0.port1;
840
871
  return ret;
841
872
  },
842
- __wbg_port2_5beec7fc726872ea: function(arg0) {
873
+ __wbg_port2_13f608e81e72a320: function(arg0) {
843
874
  const ret = arg0.port2;
844
875
  return ret;
845
876
  },
846
- __wbg_postMessage_3c61caada51b1666: function(arg0, arg1) {
847
- arg0.postMessage(arg1);
848
- },
849
877
  __wbg_postMessage_8105a302ed002474: function() { return handleError(function (arg0, arg1) {
850
878
  arg0.postMessage(arg1);
851
879
  }, arguments); },
880
+ __wbg_postMessage_9314233a76bab9ee: function(arg0, arg1) {
881
+ arg0.postMessage(arg1);
882
+ },
883
+ __wbg_prototypesetcall_804a1eb1b047ccb9: function(arg0, arg1, arg2) {
884
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
885
+ },
852
886
  __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
853
887
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
854
888
  },
@@ -856,7 +890,7 @@ function __wbg_get_imports(memory) {
856
890
  const ret = arg0.push(arg1);
857
891
  return ret;
858
892
  },
859
- __wbg_query_efb6db1a3d55a3ad: function(arg0) {
893
+ __wbg_query_3d462d24f516c5a4: function(arg0) {
860
894
  const ret = arg0.query();
861
895
  return ret;
862
896
  },
@@ -871,11 +905,11 @@ function __wbg_get_imports(memory) {
871
905
  const ret = Math.random();
872
906
  return ret;
873
907
  },
874
- __wbg_removeEntry_1b9e221ee38d4e42: function(arg0, arg1, arg2) {
908
+ __wbg_removeEntry_2c5778bde4bd1992: function(arg0, arg1, arg2) {
875
909
  const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
876
910
  return ret;
877
911
  },
878
- __wbg_removeEntry_86f78a95cbdd24e9: function(arg0, arg1, arg2, arg3) {
912
+ __wbg_removeEntry_5fc4131f1ba40116: function(arg0, arg1, arg2, arg3) {
879
913
  const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
880
914
  return ret;
881
915
  },
@@ -883,7 +917,7 @@ function __wbg_get_imports(memory) {
883
917
  const ret = Rendering.__wrap(arg0);
884
918
  return ret;
885
919
  },
886
- __wbg_request_6b450d3992aeb13d: function(arg0, arg1, arg2, arg3) {
920
+ __wbg_request_0a6b15ecddd631ff: function(arg0, arg1, arg2, arg3) {
887
921
  const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
888
922
  return ret;
889
923
  },
@@ -898,23 +932,23 @@ function __wbg_get_imports(memory) {
898
932
  __wbg_set_c41f8dbc07a2190f: function(arg0, arg1, arg2) {
899
933
  arg0.set(getArrayF32FromWasm0(arg1, arg2));
900
934
  },
901
- __wbg_set_name_e4819287165b05d1: function(arg0, arg1, arg2) {
935
+ __wbg_set_name_4cbb027eee558013: function(arg0, arg1, arg2) {
902
936
  arg0.name = getStringFromWasm0(arg1, arg2);
903
937
  },
904
938
  __wbg_set_onmessage_2244c2525c4e0c38: function(arg0, arg1) {
905
939
  arg0.onmessage = arg1;
906
940
  },
907
- __wbg_set_onmessage_232e342b60feeca4: function(arg0, arg1) {
941
+ __wbg_set_onmessage_6dd93e718e5e432d: function(arg0, arg1) {
908
942
  arg0.onmessage = arg1;
909
943
  },
910
- __wbg_set_refusal_f2fa88e6ccb37a7e: function(arg0, arg1) {
944
+ __wbg_set_refusal_e2d9a167c42cdd01: function(arg0, arg1) {
911
945
  arg0.refusal = arg1;
912
946
  },
913
- __wbg_size_5a2226b568e6b92e: function(arg0) {
947
+ __wbg_size_4388186a86723652: function(arg0) {
914
948
  const ret = arg0.size;
915
949
  return ret;
916
950
  },
917
- __wbg_slice_66be786cc6913415: function(arg0, arg1, arg2) {
951
+ __wbg_slice_3131863e9678fb89: function(arg0, arg1, arg2) {
918
952
  const ret = arg0.slice(arg1, arg2);
919
953
  return ret;
920
954
  },
@@ -974,10 +1008,10 @@ function __wbg_get_imports(memory) {
974
1008
  const ret = Atomics.waitAsync;
975
1009
  return ret;
976
1010
  },
977
- __wbg_warn_388b7da4752f674a: function(arg0, arg1) {
1011
+ __wbg_warn_3ea8ad2ce5082ff8: function(arg0, arg1) {
978
1012
  console.warn(getStringFromWasm0(arg0, arg1));
979
1013
  },
980
- __wbg_write_5c9728c5bad7ce2f: function(arg0, arg1) {
1014
+ __wbg_write_8923a8ef793e1f61: function(arg0, arg1) {
981
1015
  const ret = arg0.write(arg1);
982
1016
  return ret;
983
1017
  },
package/sva_wasm_bg.wasm CHANGED
Binary file