@scalable-vector-audio/sva-wasm 0.7.11 → 0.7.12

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.7.11",
5
+ "version": "0.7.12",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
package/sva_wasm.d.ts CHANGED
@@ -27,29 +27,21 @@ export class Composition {
27
27
  prune(policy: string): void;
28
28
  /**
29
29
  * `target` as `sva-cli render` takes it, `@piano([0, 2b], f0=C4)`; `representations`
30
- * what `representations()` answers, `samples` where unset, each a call as
31
- * `--representation` writes it. `options` sets `rate`, `bits`, `flop_budget`, `until` and
32
- * `volatile`.
30
+ * what `representations()` answers, each a call as `--representation` writes it.
31
+ * `options`: `rate`, `bits`, `flop_budget`, `until`, `volatile`, and `out: null`, which
32
+ * hands back no samples and reads only `representations`, `samples` otherwise.
33
33
  */
34
34
  render(target: string, representations: string[] | null | undefined, options: any): Promise<Rendering>;
35
35
  set_cache_policy(policy: string): void;
36
- set_prune_policy(policy: string): void;
37
36
  /**
38
37
  * `target` block by block. `options`: `rate`, `bits`, `until`, `live`, `channels`.
39
38
  */
40
39
  stream(target: string, block: number, options: any): Promise<Stream>;
41
- /**
42
- * `target` computed into memory as `render` would; `{ stats, representations }`, the
43
- * latter `representations()` for `readings`. Options: `rate`, `bits`, `flop_budget`,
44
- * `readings`.
45
- */
46
- warm(target: string, options: any): Promise<any>;
47
40
  readonly cache_bytes: number;
48
41
  readonly cache_entries: number;
49
42
  readonly cache_evictions: number;
50
43
  cache_max_bytes: number;
51
44
  readonly cache_policy: string;
52
- readonly prune_policy: string;
53
45
  }
54
46
 
55
47
  export class Rendering {
@@ -160,13 +152,10 @@ export interface InitOutput {
160
152
  readonly composition_open: (a: number, b: number, c: number) => any;
161
153
  readonly composition_persist: (a: number) => any;
162
154
  readonly composition_prune: (a: number, b: number, c: number) => [number, number];
163
- readonly composition_prune_policy: (a: number) => [number, number];
164
155
  readonly composition_render: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
165
156
  readonly composition_set_cache_max_bytes: (a: number, b: number) => void;
166
157
  readonly composition_set_cache_policy: (a: number, b: number, c: number) => [number, number];
167
- readonly composition_set_prune_policy: (a: number, b: number, c: number) => [number, number];
168
158
  readonly composition_stream: (a: number, b: number, c: number, d: number, e: any) => any;
169
- readonly composition_warm: (a: number, b: number, c: number, d: any) => any;
170
159
  readonly outline: (a: number, b: number) => [number, number, number];
171
160
  readonly rendering_channels: (a: number) => number;
172
161
  readonly rendering_duration_secs: (a: number) => number;
@@ -195,7 +184,7 @@ export interface InitOutput {
195
184
  readonly stream_work: (a: number) => [number, number, number];
196
185
  readonly wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95: (a: number, b: number, c: any, d: any) => void;
197
186
  readonly wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150: (a: number, b: number, c: any) => [number, number];
198
- readonly wasm_bindgen__convert__closures_____invoke__h79de5e4e9fa3346a: (a: number, b: number) => any;
187
+ readonly wasm_bindgen__convert__closures_____invoke__h5b6034d5d61911ef: (a: number, b: number) => any;
199
188
  readonly __wbindgen_malloc: (a: number, b: number) => number;
200
189
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
201
190
  readonly __wbindgen_exn_store: (a: number) => void;
package/sva_wasm.js CHANGED
@@ -130,26 +130,11 @@ export class Composition {
130
130
  throw takeFromExternrefTable0(ret[0]);
131
131
  }
132
132
  }
133
- /**
134
- * @returns {string}
135
- */
136
- get prune_policy() {
137
- let deferred1_0;
138
- let deferred1_1;
139
- try {
140
- const ret = wasm.composition_prune_policy(this.__wbg_ptr);
141
- deferred1_0 = ret[0];
142
- deferred1_1 = ret[1];
143
- return getStringFromWasm0(ret[0], ret[1]);
144
- } finally {
145
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
146
- }
147
- }
148
133
  /**
149
134
  * `target` as `sva-cli render` takes it, `@piano([0, 2b], f0=C4)`; `representations`
150
- * what `representations()` answers, `samples` where unset, each a call as
151
- * `--representation` writes it. `options` sets `rate`, `bits`, `flop_budget`, `until` and
152
- * `volatile`.
135
+ * what `representations()` answers, each a call as `--representation` writes it.
136
+ * `options`: `rate`, `bits`, `flop_budget`, `until`, `volatile`, and `out: null`, which
137
+ * hands back no samples and reads only `representations`, `samples` otherwise.
153
138
  * @param {string} target
154
139
  * @param {string[] | null | undefined} representations
155
140
  * @param {any} options
@@ -180,17 +165,6 @@ export class Composition {
180
165
  throw takeFromExternrefTable0(ret[0]);
181
166
  }
182
167
  }
183
- /**
184
- * @param {string} policy
185
- */
186
- set_prune_policy(policy) {
187
- const ptr0 = passStringToWasm0(policy, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
188
- const len0 = WASM_VECTOR_LEN;
189
- const ret = wasm.composition_set_prune_policy(this.__wbg_ptr, ptr0, len0);
190
- if (ret[1]) {
191
- throw takeFromExternrefTable0(ret[0]);
192
- }
193
- }
194
168
  /**
195
169
  * `target` block by block. `options`: `rate`, `bits`, `until`, `live`, `channels`.
196
170
  * @param {string} target
@@ -204,20 +178,6 @@ export class Composition {
204
178
  const ret = wasm.composition_stream(this.__wbg_ptr, ptr0, len0, block, options);
205
179
  return ret;
206
180
  }
207
- /**
208
- * `target` computed into memory as `render` would; `{ stats, representations }`, the
209
- * latter `representations()` for `readings`. Options: `rate`, `bits`, `flop_budget`,
210
- * `readings`.
211
- * @param {string} target
212
- * @param {any} options
213
- * @returns {Promise<any>}
214
- */
215
- warm(target, options) {
216
- const ptr0 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
217
- const len0 = WASM_VECTOR_LEN;
218
- const ret = wasm.composition_warm(this.__wbg_ptr, ptr0, len0, options);
219
- return ret;
220
- }
221
181
  }
222
182
  if (Symbol.dispose) Composition.prototype[Symbol.dispose] = Composition.prototype.free;
223
183
 
@@ -587,7 +547,7 @@ function __wbg_get_imports() {
587
547
  __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
588
548
  arg0._wbg_cb_unref();
589
549
  },
590
- __wbg_arrayBuffer_f07c2e90cd52db62: function(arg0) {
550
+ __wbg_arrayBuffer_8f03d5b78ebe3a4e: function(arg0) {
591
551
  const ret = arg0.arrayBuffer();
592
552
  return ret;
593
553
  },
@@ -599,7 +559,7 @@ function __wbg_get_imports() {
599
559
  const ret = arg0.call(arg1, arg2);
600
560
  return ret;
601
561
  }, arguments); },
602
- __wbg_close_18d7e291293c297d: function(arg0) {
562
+ __wbg_close_c7f4b860d2ea6a47: function(arg0) {
603
563
  const ret = arg0.close();
604
564
  return ret;
605
565
  },
@@ -607,7 +567,7 @@ function __wbg_get_imports() {
607
567
  const ret = Composition.__wrap(arg0);
608
568
  return ret;
609
569
  },
610
- __wbg_createWritable_96ad69f25b5e0aa3: function(arg0) {
570
+ __wbg_createWritable_2a75642432c12d33: function(arg0) {
611
571
  const ret = arg0.createWritable();
612
572
  return ret;
613
573
  },
@@ -619,15 +579,15 @@ function __wbg_get_imports() {
619
579
  const ret = Array.from(arg0);
620
580
  return ret;
621
581
  },
622
- __wbg_getDirectoryHandle_4cf01a0ef8dc8838: function(arg0, arg1, arg2, arg3) {
582
+ __wbg_getDirectoryHandle_25b3be46cc47f02b: function(arg0, arg1, arg2, arg3) {
623
583
  const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
624
584
  return ret;
625
585
  },
626
- __wbg_getFileHandle_0a0196d063101c06: function(arg0, arg1, arg2, arg3) {
586
+ __wbg_getFileHandle_48a0d03d8fb43555: function(arg0, arg1, arg2, arg3) {
627
587
  const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
628
588
  return ret;
629
589
  },
630
- __wbg_getFile_87457664a94e628d: function(arg0) {
590
+ __wbg_getFile_040bdebdde28065f: function(arg0) {
631
591
  const ret = arg0.getFile();
632
592
  return ret;
633
593
  },
@@ -657,7 +617,7 @@ function __wbg_get_imports() {
657
617
  const ret = Array.isArray(arg0);
658
618
  return ret;
659
619
  },
660
- __wbg_keys_8838facd131c6680: function(arg0) {
620
+ __wbg_keys_f97039285c3d52fb: function(arg0) {
661
621
  const ret = arg0.keys();
662
622
  return ret;
663
623
  },
@@ -673,17 +633,21 @@ function __wbg_get_imports() {
673
633
  const ret = arg0.length;
674
634
  return ret;
675
635
  },
676
- __wbg_move_e9f3888afdee5378: function(arg0, arg1, arg2, arg3) {
636
+ __wbg_move_28983a826cc9330f: function(arg0, arg1, arg2, arg3) {
677
637
  const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
678
638
  return ret;
679
639
  },
680
- __wbg_name_b2a0e8fa7dc9f795: function(arg0, arg1) {
640
+ __wbg_name_7a0bc23891d2f56b: function(arg0, arg1) {
681
641
  const ret = arg1.name;
682
642
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
683
643
  const len1 = WASM_VECTOR_LEN;
684
644
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
685
645
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
686
646
  },
647
+ __wbg_new_102e0b0848e3aea7: function(arg0, arg1) {
648
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
649
+ return ret;
650
+ },
687
651
  __wbg_new_1da3429bc3c4541c: function(arg0) {
688
652
  const ret = new Uint8Array(arg0);
689
653
  return ret;
@@ -706,10 +670,6 @@ function __wbg_get_imports() {
706
670
  state0.a = 0;
707
671
  }
708
672
  },
709
- __wbg_new_94977a6bac8d2087: function(arg0, arg1) {
710
- const ret = new Error(getStringFromWasm0(arg0, arg1));
711
- return ret;
712
- },
713
673
  __wbg_new_bebc3f4757acf305: function() {
714
674
  const ret = new Object();
715
675
  return ret;
@@ -736,18 +696,18 @@ function __wbg_get_imports() {
736
696
  state0.a = 0;
737
697
  }
738
698
  },
739
- __wbg_next_6ce8c52a5e93c951: function(arg0) {
699
+ __wbg_next_01020fab0b97b5c1: function(arg0) {
740
700
  const ret = arg0.next();
741
701
  return ret;
742
702
  },
743
- __wbg_parse_137470364fb37b46: function() { return handleError(function (arg0, arg1) {
703
+ __wbg_parse_2ac530907013022a: function() { return handleError(function (arg0, arg1) {
744
704
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
745
705
  return ret;
746
706
  }, arguments); },
747
707
  __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
748
708
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
749
709
  },
750
- __wbg_query_5c7287509234c779: function(arg0) {
710
+ __wbg_query_5b1678c887e9e494: function(arg0) {
751
711
  const ret = arg0.query();
752
712
  return ret;
753
713
  },
@@ -762,11 +722,11 @@ function __wbg_get_imports() {
762
722
  const ret = Math.random();
763
723
  return ret;
764
724
  },
765
- __wbg_removeEntry_08e6fab1462cddc0: function(arg0, arg1, arg2, arg3) {
725
+ __wbg_removeEntry_9bc2ca700ad0dc67: function(arg0, arg1, arg2, arg3) {
766
726
  const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
767
727
  return ret;
768
728
  },
769
- __wbg_removeEntry_b76635b0f1b39807: function(arg0, arg1, arg2) {
729
+ __wbg_removeEntry_f3bdba746dbb58ab: function(arg0, arg1, arg2) {
770
730
  const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
771
731
  return ret;
772
732
  },
@@ -774,7 +734,7 @@ function __wbg_get_imports() {
774
734
  const ret = Rendering.__wrap(arg0);
775
735
  return ret;
776
736
  },
777
- __wbg_request_4b258bd4e8d59718: function(arg0, arg1, arg2, arg3) {
737
+ __wbg_request_e0d65e37b6bc0c8e: function(arg0, arg1, arg2, arg3) {
778
738
  const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
779
739
  return ret;
780
740
  },
@@ -789,17 +749,17 @@ function __wbg_get_imports() {
789
749
  __wbg_set_c41f8dbc07a2190f: function(arg0, arg1, arg2) {
790
750
  arg0.set(getArrayF32FromWasm0(arg1, arg2));
791
751
  },
792
- __wbg_set_name_ad160d0021c74277: function(arg0, arg1, arg2) {
752
+ __wbg_set_name_7e2b1a4388209082: function(arg0, arg1, arg2) {
793
753
  arg0.name = getStringFromWasm0(arg1, arg2);
794
754
  },
795
- __wbg_set_refusal_6e56234e4d6c3daf: function(arg0, arg1) {
755
+ __wbg_set_refusal_c7e0bdf118c521d3: function(arg0, arg1) {
796
756
  arg0.refusal = arg1;
797
757
  },
798
- __wbg_size_2e4cce3f7e2afea9: function(arg0) {
758
+ __wbg_size_5ff0355676e8eca9: function(arg0) {
799
759
  const ret = arg0.size;
800
760
  return ret;
801
761
  },
802
- __wbg_slice_7e86f72fd9fb87c2: function(arg0, arg1, arg2) {
762
+ __wbg_slice_2fbdf03b9a72bf02: function(arg0, arg1, arg2) {
803
763
  const ret = arg0.slice(arg1, arg2);
804
764
  return ret;
805
765
  },
@@ -835,21 +795,21 @@ function __wbg_get_imports() {
835
795
  const ret = arg0.then(arg1);
836
796
  return ret;
837
797
  },
838
- __wbg_warn_fd5541c02e4e31a7: function(arg0, arg1) {
798
+ __wbg_warn_b7a190536a7219ed: function(arg0, arg1) {
839
799
  console.warn(getStringFromWasm0(arg0, arg1));
840
800
  },
841
- __wbg_write_92f3f2f851dd835e: function(arg0, arg1) {
801
+ __wbg_write_c36a73d780533ec0: function(arg0, arg1) {
842
802
  const ret = arg0.write(arg1);
843
803
  return ret;
844
804
  },
845
805
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
846
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 541, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
806
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 534, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
847
807
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150);
848
808
  return ret;
849
809
  },
850
810
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
851
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 101, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: true }) -> Externref`.
852
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h79de5e4e9fa3346a);
811
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 86, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: true }) -> Externref`.
812
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h5b6034d5d61911ef);
853
813
  return ret;
854
814
  },
855
815
  __wbindgen_generic_0000000000000003: function(arg0) {
@@ -878,8 +838,8 @@ function __wbg_get_imports() {
878
838
  };
879
839
  }
880
840
 
881
- function wasm_bindgen__convert__closures_____invoke__h79de5e4e9fa3346a(arg0, arg1) {
882
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h79de5e4e9fa3346a(arg0, arg1);
841
+ function wasm_bindgen__convert__closures_____invoke__h5b6034d5d61911ef(arg0, arg1) {
842
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h5b6034d5d61911ef(arg0, arg1);
883
843
  return ret;
884
844
  }
885
845
 
package/sva_wasm_bg.wasm CHANGED
Binary file