mimium-web 4.0.0-alpha → 4.0.0-alpha.4

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/mimium_web.d.ts CHANGED
@@ -1,85 +1,101 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+
3
4
  export class Config {
4
- private constructor();
5
- free(): void;
6
- static new(): Config;
7
- sample_rate: number;
8
- input_channels: number;
9
- output_channels: number;
10
- buffer_size: number;
5
+ private constructor();
6
+ free(): void;
7
+ [Symbol.dispose](): void;
8
+ static new(): Config;
9
+ buffer_size: number;
10
+ input_channels: number;
11
+ output_channels: number;
12
+ sample_rate: number;
11
13
  }
14
+
12
15
  export class Context {
13
- free(): void;
14
- get_input_channels(): number;
15
- get_output_channels(): number;
16
- init_github_lib_cache(): Promise<void>;
17
- constructor(config: Config);
18
- compile(src: string): Promise<void>;
19
- /**
20
- * .
21
- *
22
- * # Safety
23
- * Array size of input and output must be equal to `input_channels * buffer_size` and `output_channels * buffer_size` respectively.
24
- * .
25
- */
26
- process(input: Float32Array, output: Float32Array): bigint;
27
- recompile(src: string): Promise<void>;
16
+ free(): void;
17
+ [Symbol.dispose](): void;
18
+ clear_virtual_file_cache(): void;
19
+ compile(src: string): Promise<void>;
20
+ compile_direct(src: string): void;
21
+ get_input_channels(): number;
22
+ get_output_channels(): number;
23
+ init_github_lib_cache(): Promise<void>;
24
+ init_lib_cache_with_base_url(base_url: string): Promise<void>;
25
+ constructor(config: Config);
26
+ /**
27
+ * .
28
+ *
29
+ * # Safety
30
+ * Array size of input and output must be equal to `input_channels * buffer_size` and `output_channels * buffer_size` respectively.
31
+ * .
32
+ */
33
+ process(input: Float32Array, output: Float32Array): bigint;
34
+ put_virtual_file_cache(path: string, content: string): void;
35
+ recompile(src: string): Promise<void>;
36
+ recompile_direct(src: string): void;
37
+ set_module_base_url(base_url: string): void;
28
38
  }
29
39
 
30
40
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
31
41
 
32
42
  export interface InitOutput {
33
- readonly memory: WebAssembly.Memory;
34
- readonly __wbg_config_free: (a: number, b: number) => void;
35
- readonly __wbg_context_free: (a: number, b: number) => void;
36
- readonly __wbg_get_config_buffer_size: (a: number) => number;
37
- readonly __wbg_get_config_input_channels: (a: number) => number;
38
- readonly __wbg_get_config_output_channels: (a: number) => number;
39
- readonly __wbg_get_config_sample_rate: (a: number) => number;
40
- readonly __wbg_set_config_buffer_size: (a: number, b: number) => void;
41
- readonly __wbg_set_config_input_channels: (a: number, b: number) => void;
42
- readonly __wbg_set_config_output_channels: (a: number, b: number) => void;
43
- readonly __wbg_set_config_sample_rate: (a: number, b: number) => void;
44
- readonly config_new: () => number;
45
- readonly context_compile: (a: number, b: number, c: number) => any;
46
- readonly context_get_input_channels: (a: number) => number;
47
- readonly context_get_output_channels: (a: number) => number;
48
- readonly context_init_github_lib_cache: (a: number) => any;
49
- readonly context_new: (a: number) => number;
50
- readonly context_process: (a: number, b: number, c: number, d: number, e: number, f: any) => bigint;
51
- readonly context_recompile: (a: number, b: number, c: number) => any;
52
- readonly __wbindgen_exn_store: (a: number) => void;
53
- readonly __externref_table_alloc: () => number;
54
- readonly __wbindgen_export_2: WebAssembly.Table;
55
- readonly __wbindgen_malloc: (a: number, b: number) => number;
56
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
57
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
58
- readonly __wbindgen_export_6: WebAssembly.Table;
59
- readonly closure80_externref_shim: (a: number, b: number, c: any) => void;
60
- readonly closure93_externref_shim: (a: number, b: number, c: any) => void;
61
- readonly closure649_externref_shim: (a: number, b: number, c: any) => void;
62
- readonly closure662_externref_shim: (a: number, b: number, c: any, d: any) => void;
63
- readonly __wbindgen_start: () => void;
43
+ readonly memory: WebAssembly.Memory;
44
+ readonly __wbg_config_free: (a: number, b: number) => void;
45
+ readonly __wbg_context_free: (a: number, b: number) => void;
46
+ readonly __wbg_get_config_buffer_size: (a: number) => number;
47
+ readonly __wbg_get_config_input_channels: (a: number) => number;
48
+ readonly __wbg_get_config_output_channels: (a: number) => number;
49
+ readonly __wbg_get_config_sample_rate: (a: number) => number;
50
+ readonly __wbg_set_config_buffer_size: (a: number, b: number) => void;
51
+ readonly __wbg_set_config_input_channels: (a: number, b: number) => void;
52
+ readonly __wbg_set_config_output_channels: (a: number, b: number) => void;
53
+ readonly __wbg_set_config_sample_rate: (a: number, b: number) => void;
54
+ readonly config_new: () => number;
55
+ readonly context_clear_virtual_file_cache: (a: number) => [number, number];
56
+ readonly context_compile: (a: number, b: number, c: number) => any;
57
+ readonly context_compile_direct: (a: number, b: number, c: number) => [number, number];
58
+ readonly context_get_input_channels: (a: number) => number;
59
+ readonly context_get_output_channels: (a: number) => number;
60
+ readonly context_init_github_lib_cache: (a: number) => any;
61
+ readonly context_init_lib_cache_with_base_url: (a: number, b: number, c: number) => any;
62
+ readonly context_new: (a: number) => number;
63
+ readonly context_process: (a: number, b: number, c: number, d: number, e: number, f: any) => bigint;
64
+ readonly context_put_virtual_file_cache: (a: number, b: number, c: number, d: number, e: number) => [number, number];
65
+ readonly context_recompile: (a: number, b: number, c: number) => any;
66
+ readonly context_recompile_direct: (a: number, b: number, c: number) => [number, number];
67
+ readonly context_set_module_base_url: (a: number, b: number, c: number) => [number, number];
68
+ readonly wasm_bindgen__closure__destroy__hab95d7be7d8a5a60: (a: number, b: number) => void;
69
+ readonly wasm_bindgen__convert__closures_____invoke__ha0f31ef339bf6681: (a: number, b: number, c: any) => [number, number];
70
+ readonly wasm_bindgen__convert__closures_____invoke__h0d15b73cb2272b2b: (a: number, b: number, c: any, d: any) => void;
71
+ readonly __wbindgen_exn_store: (a: number) => void;
72
+ readonly __externref_table_alloc: () => number;
73
+ readonly __wbindgen_externrefs: WebAssembly.Table;
74
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
75
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
76
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
77
+ readonly __externref_table_dealloc: (a: number) => void;
78
+ readonly __wbindgen_start: () => void;
64
79
  }
65
80
 
66
81
  export type SyncInitInput = BufferSource | WebAssembly.Module;
82
+
67
83
  /**
68
- * Instantiates the given `module`, which can either be bytes or
69
- * a precompiled `WebAssembly.Module`.
70
- *
71
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
72
- *
73
- * @returns {InitOutput}
74
- */
84
+ * Instantiates the given `module`, which can either be bytes or
85
+ * a precompiled `WebAssembly.Module`.
86
+ *
87
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
88
+ *
89
+ * @returns {InitOutput}
90
+ */
75
91
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
76
92
 
77
93
  /**
78
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
79
- * for everything else, calls `WebAssembly.instantiate` directly.
80
- *
81
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
82
- *
83
- * @returns {Promise<InitOutput>}
84
- */
94
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
95
+ * for everything else, calls `WebAssembly.instantiate` directly.
96
+ *
97
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
98
+ *
99
+ * @returns {Promise<InitOutput>}
100
+ */
85
101
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;