<|start_filename|>scripts/wasm_shared_memory_transformer.js<|end_filename|>
const fs = require('fs');
const path = require('path');

const inputFile = fs.readFileSync(path.resolve(__dirname, '../app/soxr_wasm_thread.wat')).toString();
const output = inputFile.replace(/(\(memory \(;0;\) \d+ \d+)/g, '$1 shared');
fs.writeFileSync(path.resolve(__dirname, '../app/soxr_wasm_thread.wat'), output);


<|start_filename|>deps/glue.c<|end_filename|>
#include "soxr/src/soxr.h"

int sizeof_soxr_io_spec_t() {
  return sizeof(soxr_io_spec_t);
};

int sizeof_soxr_quality_spec_t() {
  return sizeof(soxr_quality_spec_t);
};


<|start_filename|>package.json<|end_filename|>
{
  "name": "wasm-audio-resampler",
  "version": "2.0.0",
  "description": "An WebAssembly implementation of Soxr audio resampling lib",
  "main": "app/index.js",
  "types": "app/index.d.ts",
  "scripts": {
    "build": "tsc -b",
    "build:watch": "tsc -w",
    "deploy": "np --no-tests",
    "test": "node app/test.js"
  },
  "author": "<NAME> <<EMAIL>>",
  "repository": "https://github.com/geekuillaume/wasm-audio-resampler",
  "keywords": [
    "audio",
    "resampling",
    "pcm",
    "soxr",
    "wasm"
  ],
  "license": "MIT",
  "devDependencies": {
    "@types/emscripten": "^1.39.4",
    "benny": "^3.6.14",
    "np": "^6.2.1",
    "typescript": "^3.9.6"
  },
  "dependencies": {
    "threads": "^1.6.3"
  }
}
