LAME MP3 WebAssembly component

License and corresponding source

GNU Library GPL 2.0

License text

The license grants the right to inspect, modify, rebuild, and replace the LAME component.

Read the complete license

Cinejma interface and build source

C bridge

LGPL-2.0-or-later

The complete interface compiled together with libmp3lame into the replaceable Wasm file.

View lame_bridge.c

Wasm configuration

Build source

The explicit minimal Emscripten platform definitions used instead of an opaque generated configure result.

View config.h

Worker protocol

LGPL-2.0-or-later

The complete runtime glue. It accepts initialize, planar PCM encode, and finish messages and returns complete MP3 frames.

View lame-encoder-worker.js

Reproducible build

Build instructions

Run this script in the project root with Emscripten activated. Set LAME_SOURCE_DIR to a modified compatible source tree to build a replacement.

View build-lame-wasm.sh

Replacement contract

The replacement must retain the published Worker messages and exported C functions, but it may contain any LGPL-compatible modified LAME build. Replace /wasm/lame.js and /wasm/lame.wasm, update the cache revision in the Worker, and reload the editor. Cinejma’s terms do not prohibit reverse engineering performed to debug a modified LAME component.