mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
use temp song file
This commit is contained in:
parent
a405f2ece9
commit
ced6fa0efc
@ -1,15 +1,10 @@
|
|||||||
import { readFile, writeFile } from 'fs/promises';
|
import { readFile, writeFile } from 'fs/promises';
|
||||||
|
|
||||||
const wasm = (await readFile('./groove.wasm'));
|
const wasm = (await readFile('./temp_song_file.wasm'));
|
||||||
|
|
||||||
const mod = await WebAssembly.instantiate(wasm, {
|
const mod = await WebAssembly.instantiate(wasm, {
|
||||||
m: {
|
|
||||||
pow: Math.pow,
|
|
||||||
log2: Math.log2,
|
|
||||||
sin: Math.sin
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const mem = mod.instance.exports.m;
|
const mem = mod.instance.exports.m;
|
||||||
|
|
||||||
await writeFile('test.raw', new Uint8Array(mem.buffer,mod.instance.exports.s,mod.instance.exports.l));
|
await writeFile('test.raw', new Uint8Array(mem.buffer,mod.instance.exports.s,mod.instance.exports.l));
|
Loading…
x
Reference in New Issue
Block a user