mimium-web 3.1.0 → 3.1.2
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 +14 -14
- package/mimium_web.js +33 -33
- package/mimium_web_bg.wasm +0 -0
- package/package.json +1 -1
package/mimium_web.d.ts
CHANGED
|
@@ -11,11 +11,10 @@ export class Config {
|
|
|
11
11
|
}
|
|
12
12
|
export class Context {
|
|
13
13
|
free(): void;
|
|
14
|
-
constructor(config: Config);
|
|
15
|
-
compile(src: string): void;
|
|
16
|
-
recompile(src: string): void;
|
|
17
14
|
get_input_channels(): number;
|
|
18
15
|
get_output_channels(): number;
|
|
16
|
+
constructor(config: Config);
|
|
17
|
+
compile(src: string): void;
|
|
19
18
|
/**
|
|
20
19
|
* .
|
|
21
20
|
*
|
|
@@ -24,6 +23,7 @@ export class Context {
|
|
|
24
23
|
* .
|
|
25
24
|
*/
|
|
26
25
|
process(input: Float32Array, output: Float32Array): bigint;
|
|
26
|
+
recompile(src: string): void;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -31,22 +31,22 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
31
31
|
export interface InitOutput {
|
|
32
32
|
readonly memory: WebAssembly.Memory;
|
|
33
33
|
readonly __wbg_config_free: (a: number, b: number) => void;
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
34
|
+
readonly __wbg_context_free: (a: number, b: number) => void;
|
|
35
|
+
readonly __wbg_get_config_buffer_size: (a: number) => number;
|
|
36
36
|
readonly __wbg_get_config_input_channels: (a: number) => number;
|
|
37
|
-
readonly __wbg_set_config_input_channels: (a: number, b: number) => void;
|
|
38
37
|
readonly __wbg_get_config_output_channels: (a: number) => number;
|
|
39
|
-
readonly
|
|
40
|
-
readonly __wbg_get_config_buffer_size: (a: number) => number;
|
|
38
|
+
readonly __wbg_get_config_sample_rate: (a: number) => number;
|
|
41
39
|
readonly __wbg_set_config_buffer_size: (a: number, b: number) => void;
|
|
40
|
+
readonly __wbg_set_config_input_channels: (a: number, b: number) => void;
|
|
41
|
+
readonly __wbg_set_config_output_channels: (a: number, b: number) => void;
|
|
42
|
+
readonly __wbg_set_config_sample_rate: (a: number, b: number) => void;
|
|
42
43
|
readonly config_new: () => number;
|
|
43
|
-
readonly __wbg_context_free: (a: number, b: number) => void;
|
|
44
|
-
readonly context_new: (a: number) => number;
|
|
45
44
|
readonly context_compile: (a: number, b: number, c: number) => void;
|
|
46
|
-
readonly context_recompile: (a: number, b: number, c: number) => void;
|
|
47
45
|
readonly context_get_input_channels: (a: number) => number;
|
|
48
46
|
readonly context_get_output_channels: (a: number) => number;
|
|
47
|
+
readonly context_new: (a: number) => number;
|
|
49
48
|
readonly context_process: (a: number, b: number, c: number, d: number, e: number, f: any) => bigint;
|
|
49
|
+
readonly context_recompile: (a: number, b: number, c: number) => void;
|
|
50
50
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
51
51
|
readonly __externref_table_alloc: () => number;
|
|
52
52
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
@@ -54,9 +54,9 @@ export interface InitOutput {
|
|
|
54
54
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
55
55
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
56
56
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
57
|
+
readonly closure64_externref_shim: (a: number, b: number, c: any) => void;
|
|
58
|
+
readonly closure78_externref_shim: (a: number, b: number, c: any) => void;
|
|
59
|
+
readonly closure95_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
60
60
|
readonly __wbindgen_start: () => void;
|
|
61
61
|
}
|
|
62
62
|
|
package/mimium_web.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { read_file } from './snippets/mimium-lang-
|
|
1
|
+
import { read_file } from './snippets/mimium-lang-f658bc606f78e87a/src/utils/fileloader.cjs';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
@@ -234,15 +234,15 @@ function passArrayF32ToWasm0(arg, malloc) {
|
|
|
234
234
|
return ptr;
|
|
235
235
|
}
|
|
236
236
|
function __wbg_adapter_18(arg0, arg1, arg2) {
|
|
237
|
-
wasm.
|
|
237
|
+
wasm.closure64_externref_shim(arg0, arg1, arg2);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
function __wbg_adapter_21(arg0, arg1, arg2) {
|
|
241
|
-
wasm.
|
|
241
|
+
wasm.closure78_externref_shim(arg0, arg1, arg2);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
function
|
|
245
|
-
wasm.
|
|
244
|
+
function __wbg_adapter_71(arg0, arg1, arg2, arg3) {
|
|
245
|
+
wasm.closure95_externref_shim(arg0, arg1, arg2, arg3);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
const ConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -348,6 +348,20 @@ export class Context {
|
|
|
348
348
|
const ptr = this.__destroy_into_raw();
|
|
349
349
|
wasm.__wbg_context_free(ptr, 0);
|
|
350
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* @returns {number}
|
|
353
|
+
*/
|
|
354
|
+
get_input_channels() {
|
|
355
|
+
const ret = wasm.context_get_input_channels(this.__wbg_ptr);
|
|
356
|
+
return ret >>> 0;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* @returns {number}
|
|
360
|
+
*/
|
|
361
|
+
get_output_channels() {
|
|
362
|
+
const ret = wasm.context_get_output_channels(this.__wbg_ptr);
|
|
363
|
+
return ret >>> 0;
|
|
364
|
+
}
|
|
351
365
|
/**
|
|
352
366
|
* @param {Config} config
|
|
353
367
|
*/
|
|
@@ -367,28 +381,6 @@ export class Context {
|
|
|
367
381
|
const len0 = WASM_VECTOR_LEN;
|
|
368
382
|
wasm.context_compile(this.__wbg_ptr, ptr0, len0);
|
|
369
383
|
}
|
|
370
|
-
/**
|
|
371
|
-
* @param {string} src
|
|
372
|
-
*/
|
|
373
|
-
recompile(src) {
|
|
374
|
-
const ptr0 = passStringToWasm0(src, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
375
|
-
const len0 = WASM_VECTOR_LEN;
|
|
376
|
-
wasm.context_recompile(this.__wbg_ptr, ptr0, len0);
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* @returns {number}
|
|
380
|
-
*/
|
|
381
|
-
get_input_channels() {
|
|
382
|
-
const ret = wasm.context_get_input_channels(this.__wbg_ptr);
|
|
383
|
-
return ret >>> 0;
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* @returns {number}
|
|
387
|
-
*/
|
|
388
|
-
get_output_channels() {
|
|
389
|
-
const ret = wasm.context_get_output_channels(this.__wbg_ptr);
|
|
390
|
-
return ret >>> 0;
|
|
391
|
-
}
|
|
392
384
|
/**
|
|
393
385
|
* .
|
|
394
386
|
*
|
|
@@ -407,6 +399,14 @@ export class Context {
|
|
|
407
399
|
const ret = wasm.context_process(this.__wbg_ptr, ptr0, len0, ptr1, len1, output);
|
|
408
400
|
return BigInt.asUintN(64, ret);
|
|
409
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* @param {string} src
|
|
404
|
+
*/
|
|
405
|
+
recompile(src) {
|
|
406
|
+
const ptr0 = passStringToWasm0(src, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
+
const len0 = WASM_VECTOR_LEN;
|
|
408
|
+
wasm.context_recompile(this.__wbg_ptr, ptr0, len0);
|
|
409
|
+
}
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
async function __wbg_load(module, imports) {
|
|
@@ -472,7 +472,7 @@ function __wbg_get_imports() {
|
|
|
472
472
|
const a = state0.a;
|
|
473
473
|
state0.a = 0;
|
|
474
474
|
try {
|
|
475
|
-
return
|
|
475
|
+
return __wbg_adapter_71(a, state0.b, arg0, arg1);
|
|
476
476
|
} finally {
|
|
477
477
|
state0.a = a;
|
|
478
478
|
}
|
|
@@ -550,7 +550,7 @@ function __wbg_get_imports() {
|
|
|
550
550
|
const ret = arg0.open();
|
|
551
551
|
return ret;
|
|
552
552
|
};
|
|
553
|
-
imports.wbg.
|
|
553
|
+
imports.wbg.__wbg_readfile_102f0f93b8576db6 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
554
554
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
555
555
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
556
556
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -607,12 +607,12 @@ function __wbg_get_imports() {
|
|
|
607
607
|
const ret = false;
|
|
608
608
|
return ret;
|
|
609
609
|
};
|
|
610
|
-
imports.wbg.
|
|
611
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
610
|
+
imports.wbg.__wbindgen_closure_wrapper202 = function(arg0, arg1, arg2) {
|
|
611
|
+
const ret = makeMutClosure(arg0, arg1, 65, __wbg_adapter_18);
|
|
612
612
|
return ret;
|
|
613
613
|
};
|
|
614
|
-
imports.wbg.
|
|
615
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
614
|
+
imports.wbg.__wbindgen_closure_wrapper234 = function(arg0, arg1, arg2) {
|
|
615
|
+
const ret = makeMutClosure(arg0, arg1, 79, __wbg_adapter_21);
|
|
616
616
|
return ret;
|
|
617
617
|
};
|
|
618
618
|
imports.wbg.__wbindgen_copy_to_typed_array = function(arg0, arg1, arg2) {
|
package/mimium_web_bg.wasm
CHANGED
|
Binary file
|