mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-01 04:43:51 +02:00
Create @mediabunny/mp3-encoder, restructure and extend build system
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
Build
|
||||
|
||||
Compiling LAME:
|
||||
```
|
||||
emconfigure ./configure \
|
||||
CFLAGS="-DNDEBUG -DNO_STDIO -O3 -msimd128" \
|
||||
--disable-dependency-tracking \
|
||||
--disable-shared \
|
||||
--disable-gtktest \
|
||||
--disable-analyzer-hooks \
|
||||
--disable-decoder \
|
||||
--disable-frontend
|
||||
|
||||
emmake make clean
|
||||
emmake make
|
||||
```
|
||||
|
||||
Then extract the file `libmp3lame/.libs/libmp3lame.a`, which you'll need to build the LAME bridge.
|
||||
|
||||
Compiling the LAME bridge:
|
||||
```
|
||||
emcc src/lame-bridge.c build/libmp3lame.a \
|
||||
-s MODULARIZE=1 \
|
||||
-s EXPORT_ES6=1 \
|
||||
-s SINGLE_FILE=1 \
|
||||
-s ENVIRONMENT=web,worker \
|
||||
-s EXPORTED_RUNTIME_METHODS=cwrap,HEAPU8 \
|
||||
-s EXPORTED_FUNCTIONS=_malloc,_free \
|
||||
-msimd128 \
|
||||
-O3 \
|
||||
-o build/lame.js
|
||||
```
|
||||
Reference in New Issue
Block a user