Skip to content

Commit

Permalink
Merge pull request #93 from eshaz/upgrade-emsdk
Browse files Browse the repository at this point in the history
Upgrade emsdk
  • Loading branch information
eshaz authored Oct 9, 2023
2 parents 4fed245 + 01cbb18 commit b6b2967
Show file tree
Hide file tree
Showing 66 changed files with 3,723 additions and 3,478 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ flac-decoder-minify: $(FLAC_EMSCRIPTEN_BUILD)
OUTPUT_NAME=EmscriptenWasm \
MODULE=$(FLAC_DECODER_MODULE) \
MODULE_MIN=$(FLAC_DECODER_MODULE_MIN) \
COMPRESSION_ITERATIONS=11 \
COMPRESSION_ITERATIONS=180 \
npm run minify
cp $(FLAC_DECODER_MODULE) $(FLAC_DECODER_MODULE_MIN) $(FLAC_DECODER_MODULE_MIN).map $(DEMO_PATH)

Expand All @@ -63,7 +63,7 @@ ogg-vorbis-decoder-minify: $(OGG_VORBIS_EMSCRIPTEN_BUILD)
OUTPUT_NAME=EmscriptenWasm \
MODULE=$(OGG_VORBIS_DECODER_MODULE) \
MODULE_MIN=$(OGG_VORBIS_DECODER_MODULE_MIN) \
COMPRESSION_ITERATIONS=81 \
COMPRESSION_ITERATIONS=420 \
npm run minify
cp $(OGG_VORBIS_DECODER_MODULE) $(OGG_VORBIS_DECODER_MODULE_MIN) $(OGG_VORBIS_DECODER_MODULE_MIN).map $(DEMO_PATH)

Expand Down Expand Up @@ -106,7 +106,7 @@ opus-decoder-minify: $(OPUS_DECODER_EMSCRIPTEN_BUILD)
OUTPUT_NAME=EmscriptenWasm \
MODULE=$(OPUS_DECODER_MODULE) \
MODULE_MIN=$(OPUS_DECODER_MODULE_MIN) \
COMPRESSION_ITERATIONS=233 \
COMPRESSION_ITERATIONS=373 \
npm run minify
cp $(OPUS_DECODER_MODULE) $(OPUS_DECODER_MODULE_MIN) $(OPUS_DECODER_MODULE_MIN).map $(DEMO_PATH)

Expand All @@ -130,7 +130,7 @@ mpg123-decoder-minify: $(MPG123_EMSCRIPTEN_BUILD)
OUTPUT_NAME=EmscriptenWasm \
MODULE=$(MPG123_MODULE) \
MODULE_MIN=$(MPG123_MODULE_MIN) \
COMPRESSION_ITERATIONS=72 \
COMPRESSION_ITERATIONS=40 \
npm run minify
cp $(MPG123_MODULE) $(MPG123_MODULE_MIN) $(MPG123_MODULE_MIN).map $(DEMO_PATH)

Expand All @@ -153,7 +153,6 @@ define EMCC_OPTS
-s NO_FILESYSTEM=1 \
-s ENVIRONMENT=web,worker \
-s STRICT=1 \
-s LLD_REPORT_UNDEFINED \
-s INCOMING_MODULE_JS_API="[]"
endef

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Pre-built minified JS files are available from NPM and in each decoder's `dist`

### [`mpg123-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/master/src/mpg123-decoder)
Decodes MPEG Layer I/II/III into PCM
* 72.3 KiB minified bundle size
* 74.5 KiB minified bundle size
* Browser and NodeJS support
* Built in Web Worker support
* Based on [`mpg123`](https://www.mpg123.de/)
* Install using [NPM](https://www.npmjs.com/package/mpg123-decoder)

### [`@wasm-audio-decoders/flac`](https://github.com/eshaz/wasm-audio-decoders/tree/master/src/flac)
Decodes FLAC data into PCM
* 63.7 KiB minified bundle size
* 64.6 KiB minified bundle size
* Browser and NodeJS support
* Built in Web Worker support
* Multichannel decoding (up to 8 channels)
Expand All @@ -32,7 +32,7 @@ Decodes FLAC data into PCM

### [`ogg-opus-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/master/src/ogg-opus-decoder)
Decodes Ogg Opus data into PCM
* 107.5 KiB minified bundle size
* 108.2 KiB minified bundle size
* Browser and NodeJS support
* Built in Web Worker support
* Multichannel decoding (up to 255 channels)
Expand All @@ -41,7 +41,7 @@ Decodes Ogg Opus data into PCM

### [`opus-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/master/src/opus-decoder)
Decodes raw Opus audio frames into PCM
* 84.3 KiB minified bundle size
* 84.6 KiB minified bundle size
* Browser and NodeJS support
* Built in Web Worker support
* Multichannel decoding (up to 255 channels)
Expand All @@ -51,7 +51,7 @@ Decodes raw Opus audio frames into PCM

### [`@wasm-audio-decoders/ogg-vorbis`](https://github.com/eshaz/wasm-audio-decoders/tree/master/src/ogg-vorbis)
Decodes Ogg Vorbis data into PCM
* 95.1 KiB minified bundle size
* 97.6 KiB minified bundle size
* Browser and NodeJS support
* Built in Web Worker support
* Multichannel decoding (up to 255 channels)
Expand All @@ -63,7 +63,7 @@ Decodes Ogg Vorbis data into PCM

### Prerequisites
1. Install Emscripten by following these [instructions](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#installation-instructions).
* This repository has been tested with Emscripten 2.0.34.
* This repository has been tested with Emscripten 3.1.46.

### Building
1. Make sure to `source` the Emscripten path in the terminal you want build in.
Expand Down
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ this.getModule = () =>
this.instantiate = () => {
this.getModule().then((wasm) => WebAssembly.instantiate(wasm, imports)).then((instance) => {
var asm = instance.exports;`,
const wasmExports = instance.exports;`,
);

const wasmBase64ContentMatcher =
Expand Down
340 changes: 165 additions & 175 deletions demo/flac-decoder.js

Large diffs are not rendered by default.

168 changes: 85 additions & 83 deletions demo/flac-decoder.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/flac-decoder.min.js.map

Large diffs are not rendered by default.

542 changes: 256 additions & 286 deletions demo/mpg123-decoder.js

Large diffs are not rendered by default.

Binary file modified demo/mpg123-decoder.min.js
Binary file not shown.
2 changes: 1 addition & 1 deletion demo/mpg123-decoder.min.js.map

Large diffs are not rendered by default.

489 changes: 247 additions & 242 deletions demo/ogg-opus-decoder.js

Large diffs are not rendered by default.

Binary file modified demo/ogg-opus-decoder.min.js
Binary file not shown.
2 changes: 1 addition & 1 deletion demo/ogg-opus-decoder.min.js.map

Large diffs are not rendered by default.

475 changes: 236 additions & 239 deletions demo/ogg-vorbis-decoder.js

Large diffs are not rendered by default.

365 changes: 182 additions & 183 deletions demo/ogg-vorbis-decoder.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/ogg-vorbis-decoder.min.js.map

Large diffs are not rendered by default.

489 changes: 247 additions & 242 deletions demo/opus-decoder.js

Large diffs are not rendered by default.

Binary file modified demo/opus-decoder.min.js
Binary file not shown.
2 changes: 1 addition & 1 deletion demo/opus-decoder.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit b6b2967

Please sign in to comment.