Skip to content

Commit 3650f29

Browse files
authored
Merge pull request #153 from chris-rudmin/emscripten-bump
Bugfix
2 parents 9bbea71 + f71b4bb commit 3650f29

23 files changed

+48178
-46393
lines changed

Makefile

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
INPUT_DIR=./src
22
OUTPUT_DIR=./dist
33
OUTPUT_DIR_UNMINIFIED=./dist-unminified
4-
EMCC_OPTS=-O3 --llvm-lto 1 -s NO_DYNAMIC_EXECUTION=1 -s NO_FILESYSTEM=1 -s WASM=1
4+
EMCC_OPTS=-O3 --llvm-lto 1 -s NO_DYNAMIC_EXECUTION=1 -s NO_FILESYSTEM=1
55
DEFAULT_EXPORTS:='_malloc','_free'
66

77
LIBOPUS_ENCODER_SRC=$(INPUT_DIR)/encoderWorker.js
@@ -55,29 +55,29 @@ $(LIBSPEEXDSP_OBJ): $(LIBSPEEXDSP_DIR)/autogen.sh
5555
cd $(LIBSPEEXDSP_DIR); emmake make
5656

5757
$(LIBOPUS_ENCODER): $(LIBOPUS_ENCODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
58-
npm run webpack -- --output-library EncoderWorker --output-library-target umd $(LIBOPUS_ENCODER_SRC) $@
58+
npm run webpack -- --config webpack.config.js -d --output-library EncoderWorker $(LIBOPUS_ENCODER_SRC) -o $@
5959
emcc -o $@ $(EMCC_OPTS) -g3 -s EXPORTED_FUNCTIONS="[$(DEFAULT_EXPORTS),$(LIBOPUS_ENCODER_EXPORTS),$(LIBSPEEXDSP_EXPORTS)]" --pre-js $@ $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
6060

6161
$(LIBOPUS_ENCODER_MIN): $(LIBOPUS_ENCODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
62-
npm run webpack -- --output-library EncoderWorker --output-library-target umd --optimize-minimize $(LIBOPUS_ENCODER_SRC) $@
62+
npm run webpack -- --config webpack.config.js -p --output-library EncoderWorker $(LIBOPUS_ENCODER_SRC) -o $@
6363
emcc -o $@ $(EMCC_OPTS) -s EXPORTED_FUNCTIONS="[$(DEFAULT_EXPORTS),$(LIBOPUS_ENCODER_EXPORTS),$(LIBSPEEXDSP_EXPORTS)]" --pre-js $@ $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
6464

6565
$(LIBOPUS_DECODER): $(LIBOPUS_DECODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
66-
npm run webpack -- --output-library DecoderWorker --output-library-target umd $(LIBOPUS_DECODER_SRC) $@
66+
npm run webpack -- --config webpack.config.js -d --output-library DecoderWorker $(LIBOPUS_DECODER_SRC) -o $@
6767
emcc -o $@ $(EMCC_OPTS) -g3 -s EXPORTED_FUNCTIONS="[$(DEFAULT_EXPORTS),$(LIBOPUS_DECODER_EXPORTS),$(LIBSPEEXDSP_EXPORTS)]" --pre-js $@ $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
6868

6969
$(LIBOPUS_DECODER_MIN): $(LIBOPUS_DECODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
70-
npm run webpack -- --output-library DecoderWorker --output-library-target umd --optimize-minimize $(LIBOPUS_DECODER_SRC) $@
70+
npm run webpack -- --config webpack.config.js -p --output-library DecoderWorker $(LIBOPUS_DECODER_SRC) -o $@
7171
emcc -o $@ $(EMCC_OPTS) -s EXPORTED_FUNCTIONS="[$(DEFAULT_EXPORTS),$(LIBOPUS_DECODER_EXPORTS),$(LIBSPEEXDSP_EXPORTS)]" --pre-js $@ $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
7272

7373
$(RECORDER): $(RECORDER_SRC)
74-
npm run webpack -- --output-library Recorder --output-library-target umd $(RECORDER_SRC) $@
74+
npm run webpack -- --config webpack.config.js -d --output-library Recorder $(RECORDER_SRC) -o $@
7575

7676
$(RECORDER_MIN): $(RECORDER_SRC)
77-
npm run webpack -- --output-library Recorder --output-library-target umd --optimize-minimize $(RECORDER_SRC) $@
77+
npm run webpack -- --config webpack.config.js -p --output-library Recorder $(RECORDER_SRC) -o $@
7878

7979
$(WAVE_WORKER): $(WAVE_WORKER_SRC)
80-
npm run webpack -- --output-library WaveWorker --output-library-target umd $(WAVE_WORKER_SRC) $@
80+
npm run webpack -- --config webpack.config.js -d --output-library WaveWorker $(WAVE_WORKER_SRC) -o $@
8181

8282
$(WAVE_WORKER_MIN): $(WAVE_WORKER_SRC)
83-
npm run webpack -- --output-library WaveWorker --output-library-target umd --optimize-minimize $(WAVE_WORKER_SRC) $@
83+
npm run webpack -- --config webpack.config.js -p --output-library WaveWorker $(WAVE_WORKER_SRC) -o $@

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ A javascript library to encode the output of Web Audio API nodes in Ogg Opus or
55

66
#### Libraries Used
77

8-
- Libopus: v1.2.1 compiled with emscripten 1.37.33
9-
- speexDSP: 1.2RC3 compiled with emscripten 1.37.33
8+
- Libopus: v1.2.1 compiled with emscripten 1.38.1
9+
- speexDSP: 1.2RC3 compiled with emscripten 1.38.1
1010

1111
#### Required Files
1212

@@ -63,6 +63,12 @@ Creates a recorder instance.
6363
---------
6464
#### Instance Methods
6565

66+
```js
67+
rec.clearStream()
68+
```
69+
70+
**clearStream** will stop and delete the stream as well as close the audio context. You will only ever call this manually if you have `config.leaveStreamOpen` set to `true`.
71+
6672
```js
6773
rec.pause()
6874
```
@@ -99,12 +105,6 @@ rec.stop()
99105

100106
**stop** will cease capturing audio and disable the monitoring and mic input stream. Will request the recorded data and then terminate the worker once the final data has been published. Will call the `onstop` callback when stopped.
101107

102-
```js
103-
rec.clearStream()
104-
```
105-
106-
**clearStream** will stop and delete the stream as well as close the audio context. You will only ever call this manually if you have `config.leaveStreamOpen` set to `true`.
107-
108108

109109
---------
110110
#### Static Methods

dist-unminified/decoderWorker.js

+46-263
Large diffs are not rendered by default.

dist-unminified/decoderWorker.wasm

-725 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)