From ced6fa0efc4de85e327bf7ad5db3b677fafb664c Mon Sep 17 00:00:00 2001 From: Peter Salomonsen Date: Sat, 25 Mar 2023 22:00:24 +0100 Subject: [PATCH] use temp song file --- testwasm.mjs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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