diff --git a/testwasm.mjs b/testwasm.mjs index 7a6f476..768e7ec 100644 --- a/testwasm.mjs +++ b/testwasm.mjs @@ -1,15 +1,10 @@ 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, { - m: { - pow: Math.pow, - log2: Math.log2, - sin: Math.sin - } + }); const mem = mod.instance.exports.m; - await writeFile('test.raw', new Uint8Array(mem.buffer,mod.instance.exports.s,mod.instance.exports.l)); \ No newline at end of file