Skip to content

.EX4 file editing and compiling i want #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 754 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
754 commits
Select commit Hold shift + click to select a range
f6b5777
Removing extra `monitorGain` default config specs
ZachMoreno Jan 29, 2018
88c584d
Merge pull request #136 from ZachMoreno/patch-1
chris-rudmin Jan 29, 2018
465d997
Fix readme
chris-rudmin Jan 29, 2018
3948fc0
adding test for pause() & resume() methods
ZachMoreno Jan 31, 2018
a4dd659
setMicrophoneGain() method is working as intended with tests passing
ZachMoreno Feb 1, 2018
74c6c4e
style & cleanup
ZachMoreno Feb 1, 2018
620557b
adding muteMicrophone() & unmuteMicrophone() methods & tests
ZachMoreno Feb 1, 2018
9845f94
updating readme with setMicrophoneGain(), muteMicrophone(), & unmuteM…
ZachMoreno Feb 1, 2018
84046f3
adding onmutemicrophone() & onunmutemicrophone() callbacks & adding m…
ZachMoreno Feb 1, 2018
e7a41a2
updating readme with onmutemicrophone() & onunmutemicrophone() callbacks
ZachMoreno Feb 1, 2018
9a86130
adding callbacks
ZachMoreno Feb 1, 2018
81cefec
Recorder should stop recording - AssertionError: expected disconnect …
ZachMoreno Feb 1, 2018
42f2a3a
monitorNode.disconnect() & sourceNode.disconnect() are being called t…
ZachMoreno Feb 1, 2018
cc58898
removing muteMicrophone() & unmuteMicrophone() methods, removing the …
ZachMoreno Feb 1, 2018
12d2112
setting microphoneGain's default value to 1
ZachMoreno Feb 1, 2018
251a289
renaming config.microphoneGain to config.sourceGain & setMicrophoneGa…
ZachMoreno Feb 1, 2018
941e0de
reversing change to setMonitorGain() description
ZachMoreno Feb 2, 2018
2e9859b
renaming config.sourceGain to config.recordingGain & setSourceGain() …
ZachMoreno Feb 2, 2018
450be09
removing unrelated pause() resume() assertion
ZachMoreno Feb 2, 2018
e144a62
testing config.recordingGain with non-default value
ZachMoreno Feb 2, 2018
bbb8fc4
renaming volumeNode to recordingNode & connecting to provided & creat…
ZachMoreno Feb 2, 2018
a6439a9
Code cleanup and fix tests
chris-rudmin Feb 3, 2018
159c179
Merge pull request #1 from chris-rudmin/cleanup
ZachMoreno Feb 3, 2018
7af54be
Merge pull request #140 from ZachMoreno/vol-mute-ctrl
chris-rudmin Feb 3, 2018
d74a075
Update emscripten
chris-rudmin Feb 3, 2018
3836946
Fix unable to adjust options in example
chris-rudmin Feb 23, 2018
15e942d
Update example
chris-rudmin Feb 23, 2018
85df682
Update License
chris-rudmin Mar 4, 2018
1236ebf
Update LICENSE.md
chris-rudmin Mar 4, 2018
494258a
Update README.md
chris-rudmin Mar 14, 2018
9bbea71
Update README.md
chris-rudmin Mar 15, 2018
731f89a
Fix comments, update to emscripten 1.38.1
chris-rudmin May 18, 2018
f94d05e
Merge branch 'master' into emscripten-bump
chris-rudmin May 18, 2018
2c2824c
bump version
chris-rudmin May 18, 2018
6a93973
fix #152
chris-rudmin May 19, 2018
eb56ce9
Add clamp test
chris-rudmin May 19, 2018
0394a33
Cleanup example
chris-rudmin May 19, 2018
b9cafdf
Update example
chris-rudmin May 19, 2018
9b30619
Update webpack
chris-rudmin May 21, 2018
5bd21ab
Convert float using rounding
chris-rudmin May 22, 2018
e7f50e3
Fix empty values in example
chris-rudmin May 22, 2018
f71b4bb
Fix option name in example
chris-rudmin May 22, 2018
3650f29
Merge pull request #153 from chris-rudmin/emscripten-bump
chris-rudmin May 22, 2018
0b4938d
Fix serial and 64bit granule pos
chris-rudmin May 22, 2018
576857a
Merge pull request #154 from chris-rudmin/int-conversion
chris-rudmin May 22, 2018
ec8fc93
Fix Distribution
chris-rudmin May 22, 2018
aff168c
Update version
chris-rudmin May 22, 2018
a65895a
Merge pull request #155 from chris-rudmin/distribution
chris-rudmin May 22, 2018
c31d955
Fix serial
chris-rudmin May 28, 2018
0305c21
Merge pull request #156 from chris-rudmin/serial-fix
chris-rudmin May 28, 2018
accce1c
Test recompile
chris-rudmin May 31, 2018
6cc6f1a
Update emscripten. cleanup recorder
chris-rudmin Jun 24, 2018
ef05ad0
Cleanup
chris-rudmin Jun 24, 2018
0f3207a
Bump to version 5
chris-rudmin Jun 24, 2018
fe3031f
Update dependencies
chris-rudmin Jun 24, 2018
e0fbdb3
Fix close audio context
chris-rudmin Jun 24, 2018
2a21a24
Update emscripten ver
chris-rudmin Aug 21, 2018
77bdc76
Update npm packages
chris-rudmin Aug 21, 2018
24dda42
Merge pull request #163 from chris-rudmin/cleanup
chris-rudmin Aug 22, 2018
716c0c7
Start encoding after worker is ready
Kukunin Oct 22, 2018
fb080a0
Send `done` message instead of null page
Kukunin Oct 28, 2018
7ac622e
Merge pull request #166 from Kukunin/wait_start
chris-rudmin Oct 29, 2018
08c4eb9
Update opus to 1.3
chris-rudmin Oct 29, 2018
6b1ca49
Update libopus to v1.3
chris-rudmin Oct 29, 2018
59620f8
Update dependencies and fix this.finish
chris-rudmin Oct 29, 2018
b926b8d
Merge pull request #167 from chris-rudmin/lower-latency
chris-rudmin Oct 29, 2018
95f4ce4
Run some async tasks in parallel
chris-rudmin Oct 29, 2018
01fb15c
Fix dependencies
chris-rudmin Oct 29, 2018
925f05d
Rename maxBuffersPerPage option to maxFramesPerPage
Kukunin Oct 31, 2018
e311c97
Consider amount of frames instead of buffers per Ogg page
Kukunin Oct 31, 2018
46ab99c
Add unit tests for maxFramesPerPage option
Kukunin Oct 31, 2018
e229fd0
Merge pull request #168 from Kukunin/maxframes
chris-rudmin Oct 31, 2018
d41879d
Deprecate Bower
chris-rudmin Oct 31, 2018
0853d35
Bump major version
chris-rudmin Oct 31, 2018
3e4fe30
Move postMessage into onmessage
chris-rudmin Oct 31, 2018
27f4ec8
Support flushing pause and waiting promise return from stop
tomwidmer Nov 23, 2018
75ecfdd
Add docs, and only enable flush if streamPages is set
tomwidmer Nov 26, 2018
8cb473a
Use addEventListener to wait for done events and resolve stop promise
tomwidmer Nov 28, 2018
2b2fd5b
Remove unnecessary nulling of captured variables
tomwidmer Dec 1, 2018
b2074db
Merge pull request #170 from tomwidmer/feature/flush
chris-rudmin Dec 2, 2018
a999669
fix typos
thijstriemstra Dec 3, 2018
660fba7
Merge pull request #172 from thijstriemstra/patch-1
chris-rudmin Dec 3, 2018
81c58f0
Add encodedSamplePosition field to recorder
tomwidmer Dec 3, 2018
d7e7d11
Support reuse of the worker
tomwidmer Dec 3, 2018
8230d62
Simplify loadWorker implementation
tomwidmer Dec 6, 2018
e928e55
Rename 'destroy' to 'destroyWorker' for clarity
tomwidmer Dec 6, 2018
bd419bd
Merge pull request #173 from tomwidmer/feature/samplePosition
chris-rudmin Dec 10, 2018
c378b04
Send pages after ready page
chris-rudmin Dec 10, 2018
8e536b6
Merge remote-tracking branch 'origin/stream-incoming' into feature/reuse
tomwidmer Dec 10, 2018
a7fcff6
Merge pull request #174 from tomwidmer/feature/reuse
chris-rudmin Dec 10, 2018
fb5e48b
Get the headers explicitly after onstart is called
chris-rudmin Dec 11, 2018
eb0a5c4
Test streamPages
chris-rudmin Dec 11, 2018
bc080f8
Undo accidental commit on master
chris-rudmin Dec 11, 2018
4400c09
Test streamPages
chris-rudmin Dec 11, 2018
0bfacf0
Remove streamPages
chris-rudmin Dec 11, 2018
525a3e7
Merge pull request #177 from chris-rudmin/onstart-fix
chris-rudmin Dec 11, 2018
b1f6fec
Add encoderComplexity control
chris-rudmin Dec 11, 2018
c9f8be5
Fix merge confict
chris-rudmin Dec 15, 2018
3983b03
Fix readme, reduce exposed methods inr ecoder
chris-rudmin Dec 15, 2018
6fd0718
Restore loadWorker method
chris-rudmin Dec 15, 2018
f8de026
Bump minor version
chris-rudmin Dec 15, 2018
8b70395
Merge pull request #180 from chris-rudmin/stream-incoming
chris-rudmin Dec 15, 2018
2f8872d
Update dependencies
chris-rudmin Feb 8, 2019
5e30014
Merge pull request #185 from chris-rudmin/dep-update
chris-rudmin Feb 8, 2019
2ee0b75
Bump Version
chris-rudmin Feb 8, 2019
2f14eba
Bump mixin-deep from 1.3.1 to 1.3.2
dependabot[bot] Sep 3, 2019
11e5b08
Merge pull request #192 from chris-rudmin/dependabot/npm_and_yarn/mix…
chris-rudmin Sep 3, 2019
05015ce
Update Dependencies
chris-rudmin Dec 12, 2019
e7621dd
Bump acorn from 6.4.0 to 6.4.1
dependabot[bot] Mar 13, 2020
13dd39d
get(Header)Pages
NukeKarasawa40298 May 3, 2020
8d7d6e1
get(Header)Pages
NukeKarasawa40298 May 3, 2020
25ef45c
Merge pull request #201 from NukeKarasawa40298/master
chris-rudmin May 4, 2020
1d10067
Update description, be more specific
chris-rudmin May 4, 2020
f0c510a
Merge pull request #202 from chris-rudmin/chris-rudmin-patch-1
chris-rudmin May 4, 2020
757f583
Merge pull request #198 from chris-rudmin/dependabot/npm_and_yarn/aco…
chris-rudmin May 4, 2020
e62016c
Update emsdk
chris-rudmin May 6, 2020
9afb75c
Moved opus to v1.3.1
chris-rudmin May 7, 2020
ec90522
Update opus to v1.3.1
chris-rudmin May 7, 2020
7902726
Update SpeexDSP
chris-rudmin May 7, 2020
07004bf
Update speexdsp to v1.2.0
chris-rudmin May 7, 2020
e4b0d3f
Update packages
chris-rudmin May 7, 2020
45c2889
Update node version in CI
chris-rudmin May 7, 2020
e61b271
Update Readme
chris-rudmin May 7, 2020
383e51d
Bump version
chris-rudmin May 7, 2020
f3fe542
Merge pull request #203 from chris-rudmin/updates
chris-rudmin May 7, 2020
5284688
Fix data structure
chris-rudmin Jun 6, 2020
497402e
Merge pull request #208 from chris-rudmin/fixDecoderExample
chris-rudmin Jun 6, 2020
7a63267
Load webAssembly in synchronous mode (inline)
chris-rudmin Jun 13, 2020
fd74b3d
Merge branch 'master' of github.com:chris-rudmin/opus-recorder into a…
chris-rudmin Jun 13, 2020
2724d6f
Add AudioWorklet Support to encoder
chris-rudmin Jun 15, 2020
8c52c6f
Merge pull request #1 from avantassessment/audioWorklet
chris-rudmin Jun 15, 2020
a5131b6
Cleanup init code
chris-rudmin Jun 15, 2020
39d1f54
Remove extra space
chris-rudmin Jun 15, 2020
073aff2
Add audioWorklet processor
chris-rudmin Jun 16, 2020
b634255
Update make instructions
chris-rudmin Jun 17, 2020
9173dbf
Fix messagePort listeners
chris-rudmin Jun 17, 2020
aa78843
Remove console log
chris-rudmin Jun 17, 2020
1e2ac55
Merge pull request #2 from avantassessment/workletDetection
chris-rudmin Jun 17, 2020
6ccbc8a
Merge pull request #4 from avantassessment/workletDetection
chris-rudmin Jun 17, 2020
625fd24
Merge branch 'master' into updateMake
chris-rudmin Jun 17, 2020
a77118b
Update make instructions only for encoder
chris-rudmin Jun 17, 2020
4c18f76
Move mkdir
chris-rudmin Jun 17, 2020
19a8bcc
Refactor encoder worker to support both scriptProcessor and audioWork…
chris-rudmin Jun 18, 2020
e439d0f
Use first input
chris-rudmin Jun 18, 2020
17525d3
Refactor encoder tests to run synchronously
chris-rudmin Jun 19, 2020
fe0490e
Add exports and sanity check for inputs
chris-rudmin Jun 19, 2020
dd32cd3
Update dist
chris-rudmin Jun 19, 2020
86cb0aa
Downgrade warn to log
chris-rudmin Jun 19, 2020
4252577
Fix references to scriptProcessor
chris-rudmin Jun 19, 2020
d06a679
Fix test by changing faked messageHandler order
chris-rudmin Jun 19, 2020
1ad9d4f
Merge pull request #5 from avantassessment/updateMake
chris-rudmin Jun 20, 2020
8494727
Merge pull request #6 from avantassessment/refactorEncoder
chris-rudmin Jun 20, 2020
ac1ffc3
Merge branch 'master' into recorderTests
chris-rudmin Jun 20, 2020
ec654aa
Update recorder tests with audioWorklets
chris-rudmin Jun 20, 2020
b235480
Add Worklet Support to waveRecorder
chris-rudmin Jun 20, 2020
bc28edf
Add AudioWorklet support to waveWorker
chris-rudmin Jun 20, 2020
3c471ed
Fix export
chris-rudmin Jun 20, 2020
8a2898f
Update deps
chris-rudmin Jun 20, 2020
b891f23
Fix bug recording wave
chris-rudmin Jun 20, 2020
210228c
Update exports
chris-rudmin Jun 21, 2020
923c2fc
Undo Reverse message handlers
chris-rudmin Jun 21, 2020
a1e37ac
Undo worker path change
chris-rudmin Jun 21, 2020
44b667c
Update comment
chris-rudmin Jun 21, 2020
99c7d41
Bump version to 7.0.0 and expose it as a Static Method
chris-rudmin Jun 21, 2020
5fcc68e
Add version to README
chris-rudmin Jun 21, 2020
120a396
Support variable buffer sizes
chris-rudmin Jun 21, 2020
46a59f1
Merge branch 'waveWorker' into test
chris-rudmin Jun 21, 2020
1a06fa5
Merge branch 'exposeVersion' into test
chris-rudmin Jun 21, 2020
e13cb2d
Merge branch 'bufferMismatch' into test
chris-rudmin Jun 21, 2020
8717c4f
Fix Firefox issues with webpack UMD code generation
chris-rudmin Jun 22, 2020
3486f40
Merge pull request #7 from avantassessment/recorderTests
chris-rudmin Jun 22, 2020
59eff36
Merge branch 'master' into waveWorker
chris-rudmin Jun 22, 2020
b0835c8
Merge pull request #8 from avantassessment/waveWorker
chris-rudmin Jun 22, 2020
5ee5b5b
Merge branch 'master' into exposeVersion
chris-rudmin Jun 22, 2020
a2a7599
Merge pull request #9 from avantassessment/exposeVersion
chris-rudmin Jun 22, 2020
ff9fa69
Merge branch 'master' into bufferMismatch
chris-rudmin Jun 22, 2020
7f45152
Merge pull request #10 from avantassessment/bufferMismatch
chris-rudmin Jun 22, 2020
99e6732
Fix webpack UMD errors in Firefox
chris-rudmin Jun 22, 2020
8760521
Update dist
chris-rudmin Jun 22, 2020
484da6d
Fix waveWorker ignoring numberOfChannels config
chris-rudmin Jun 23, 2020
4a8490f
Fix the fileEncoder example
chris-rudmin Jun 23, 2020
fb611f1
Merge pull request #12 from avantassessment/fileEncoder
chris-rudmin Jun 23, 2020
0764de9
Merge pull request #11 from avantassessment/test
chris-rudmin Jun 23, 2020
4abc541
Merge branch 'master' into test
chris-rudmin Jun 23, 2020
cb2b2c1
Merge pull request #13 from avantassessment/test
chris-rudmin Jun 24, 2020
53112be
Update docs about using with webpack
chris-rudmin Jun 24, 2020
01316d1
fix pausing in audioWorklets
chris-rudmin Jun 25, 2020
501144e
Merge pull request #14 from avantassessment/documentation
chris-rudmin Jun 25, 2020
0bbe3f7
Merge pull request #15 from avantassessment/fixPause
chris-rudmin Jun 25, 2020
e8a4cee
Edge now DOES support native playback of opus files.
chris-rudmin Jun 25, 2020
c9fe2c0
Cleanup some recorder code
chris-rudmin Jun 27, 2020
2f3ef66
Remove reuse worker option
chris-rudmin Jun 28, 2020
d5a8c43
Code cleanup
chris-rudmin Jun 29, 2020
ca3540a
Remove loadWorker from readme
chris-rudmin Jul 1, 2020
3d43bca
Merge pull request #16 from avantassessment/readme
chris-rudmin Jul 6, 2020
40cc7aa
Merge pull request #17 from avantassessment/codeCleanup
chris-rudmin Jul 6, 2020
f83f6ab
Fix bug in scriptProcessor
chris-rudmin Jul 7, 2020
7d7bba0
Clarify gotchas in the readme
chris-rudmin Jul 8, 2020
0044b5d
Merge pull request #18 from avantassessment/fixSafari
chris-rudmin Jul 8, 2020
0a1af3d
Merge pull request #19 from avantassessment/readme
chris-rudmin Jul 8, 2020
3f9ac8c
Merge pull request #212 from chris-rudmin/audioWorklets
chris-rudmin Jul 15, 2020
77ce86c
Bump lodash from 4.17.15 to 4.17.19
dependabot[bot] Jul 15, 2020
59d2f49
Merge pull request #213 from chris-rudmin/dependabot/npm_and_yarn/lod…
chris-rudmin Jul 15, 2020
28ed0f5
Add reused workers
chris-rudmin Jul 16, 2020
c151f5f
Add close
chris-rudmin Jul 16, 2020
319742d
Fix close
chris-rudmin Jul 16, 2020
5eb4508
Fix resume of audioContext
chris-rudmin Jul 16, 2020
a481849
Add dist
chris-rudmin Jul 16, 2020
1193cdc
Fix tests
chris-rudmin Jul 16, 2020
92f5ad5
Update docs
chris-rudmin Jul 16, 2020
894917c
Update WaveWorker
chris-rudmin Jul 16, 2020
4e0e6f5
mid-debug
chris-rudmin Jul 17, 2020
4d19fd1
Fix tests
chris-rudmin Jul 18, 2020
b082814
Fix iOS/macOS stream bug
chris-rudmin Jul 20, 2020
9584b6e
Fix tests
chris-rudmin Jul 20, 2020
d6308c8
Clarify docs
chris-rudmin Jul 21, 2020
2173cc3
Clarify docs
chris-rudmin Jul 21, 2020
49555da
Clarify docs
chris-rudmin Jul 21, 2020
28e655b
Clarify docs
chris-rudmin Jul 21, 2020
6e2fd1e
Merge pull request #214 from chris-rudmin/reuseWorkers
chris-rudmin Jul 21, 2020
c6fbd05
Do not import package.json
chris-rudmin Jul 21, 2020
ace356f
Merge pull request #215 from chris-rudmin/reuseWorkers
chris-rudmin Jul 21, 2020
24004fe
Add test for version
chris-rudmin Jul 21, 2020
38a8486
Recompile with new emscripten
chris-rudmin Jul 21, 2020
caba028
Fix error handling
chris-rudmin Jul 21, 2020
4364022
Merge pull request #216 from chris-rudmin/emscripten
chris-rudmin Jul 21, 2020
f94eec2
Update readme
chris-rudmin Jul 21, 2020
154fdc4
Add babel to webpack
chris-rudmin Jul 21, 2020
f71d20a
Add babel to webpack
chris-rudmin Jul 22, 2020
6d2e06d
Merge pull request #217 from chris-rudmin/babel
chris-rudmin Jul 22, 2020
e74c7c8
update example with dist
chris-rudmin Jul 22, 2020
e5c54ce
Bump ini from 1.3.5 to 1.3.7
dependabot[bot] Dec 10, 2020
0aaecb0
Merge pull request #225 from chris-rudmin/dependabot/npm_and_yarn/ini…
chris-rudmin Jan 7, 2021
ad590fb
Bump elliptic from 6.5.3 to 6.5.4
dependabot[bot] Mar 8, 2021
1c56173
Merge pull request #232 from chris-rudmin/dependabot/npm_and_yarn/ell…
chris-rudmin Mar 21, 2021
cde66c6
Bump y18n from 4.0.0 to 4.0.1
dependabot[bot] Mar 29, 2021
44b993c
Merge pull request #235 from chris-rudmin/dependabot/npm_and_yarn/y18…
chris-rudmin Apr 13, 2021
7aba9e2
Bump ssri from 6.0.1 to 6.0.2
dependabot[bot] Apr 19, 2021
c0cff6b
Bump lodash from 4.17.19 to 4.17.21
dependabot[bot] May 6, 2021
dd571aa
Bump browserslist from 4.13.0 to 4.16.6
dependabot[bot] May 26, 2021
b6ed4f2
Merge pull request #239 from chris-rudmin/dependabot/npm_and_yarn/bro…
chris-rudmin May 27, 2021
686dc6d
Merge pull request #238 from chris-rudmin/dependabot/npm_and_yarn/lod…
chris-rudmin May 27, 2021
d85bd6f
Merge pull request #237 from chris-rudmin/dependabot/npm_and_yarn/ssr…
chris-rudmin May 27, 2021
99daeb4
Update build
chris-rudmin Jun 5, 2021
f7490eb
Merge pull request #242 from chris-rudmin/bugFix
chris-rudmin Jul 27, 2021
c72bfb8
Bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Aug 10, 2021
c7d1504
Merge pull request #246 from chris-rudmin/dependabot/npm_and_yarn/pat…
chris-rudmin Sep 14, 2021
1809eca
Fix decoder bug where last page might not be found
chris-rudmin Oct 15, 2021
27fd98d
Undo example changes
chris-rudmin Oct 15, 2021
fdfdade
Merge pull request #249 from chris-rudmin/debug
chris-rudmin Oct 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:12.16.3

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn test
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/

.DS_Store
/.idea/
/*.iml
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "opus"]
path = opus
url = https://gitlab.xiph.org/xiph/opus.git
branch = v1.3.1
[submodule "speexdsp"]
path = speexdsp
url = https://gitlab.xiph.org/xiph/speexdsp.git
branch = SpeexDSP-1.2.0
74 changes: 74 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
## Opus Recorder License (MIT)

Original Work Copyright © 2013 Matt Diamond

Modified Work Copyright © 2014 Christopher Rudmin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


## Opus License (BSD)

Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
Jean-Marc Valin, Timothy B. Terriberry,
CSIRO, Gregory Maxwell, Mark Borgerding,
Erik de Castro Lopo

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

- Neither the name of Internet Society, IETF or IETF Trust, nor the
names of specific contributors, may be used to endorse or promote
products derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Opus is subject to the royalty-free patent licenses which are
specified at:

Xiph.Org Foundation:
https://datatracker.ietf.org/ipr/1524/

Microsoft Corporation:
https://datatracker.ietf.org/ipr/1914/

Broadcom Corporation:
https://datatracker.ietf.org/ipr/1526/


## Speex License (BSD)

© 2002-2003, Jean-Marc Valin/Xiph.Org Foundation

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

- Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
84 changes: 84 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
INPUT_DIR=./src
OUTPUT_DIR=./dist
OUTPUT_DIR_UNMINIFIED=./dist-unminified
EMCC_OPTS=-O3 -s NO_DYNAMIC_EXECUTION=1 -s NO_FILESYSTEM=1
DEFAULT_EXPORTS:='_malloc','_free'

LIBOPUS_ENCODER_SRC=$(INPUT_DIR)/encoderWorker.js
LIBOPUS_DECODER_SRC=$(INPUT_DIR)/decoderWorker.js
LIBOPUS_ENCODER_MIN=$(OUTPUT_DIR)/encoderWorker.min.js
LIBOPUS_ENCODER=$(OUTPUT_DIR_UNMINIFIED)/encoderWorker.js
LIBOPUS_DECODER_MIN=$(OUTPUT_DIR)/decoderWorker.min.js
LIBOPUS_DECODER=$(OUTPUT_DIR_UNMINIFIED)/decoderWorker.js
LIBOPUS_DIR=./opus
LIBOPUS_OBJ=$(LIBOPUS_DIR)/.libs/libopus.a
LIBOPUS_ENCODER_EXPORTS:='_opus_encoder_create','_opus_encode_float','_opus_encoder_ctl','_opus_encoder_destroy'
LIBOPUS_DECODER_EXPORTS:='_opus_decoder_create','_opus_decode_float','_opus_decoder_destroy'

LIBSPEEXDSP_DIR=./speexdsp
LIBSPEEXDSP_OBJ=$(LIBSPEEXDSP_DIR)/libspeexdsp/.libs/libspeexdsp.a
LIBSPEEXDSP_EXPORTS:='_speex_resampler_init','_speex_resampler_process_interleaved_float','_speex_resampler_destroy'

RECORDER_MIN=$(OUTPUT_DIR)/recorder.min.js
RECORDER=$(OUTPUT_DIR_UNMINIFIED)/recorder.js
RECORDER_SRC=$(INPUT_DIR)/recorder.js

WAVE_WORKER_MIN=$(OUTPUT_DIR)/waveWorker.min.js
WAVE_WORKER=$(OUTPUT_DIR_UNMINIFIED)/waveWorker.js
WAVE_WORKER_SRC=$(INPUT_DIR)/waveWorker.js


default: $(LIBOPUS_ENCODER) $(LIBOPUS_ENCODER_MIN) $(LIBOPUS_DECODER) $(LIBOPUS_DECODER_MIN) $(RECORDER) $(RECORDER_MIN) $(WAVE_WORKER) $(WAVE_WORKER_MIN) test

cleanDist:
rm -rf $(OUTPUT_DIR) $(OUTPUT_DIR_UNMINIFIED)
mkdir $(OUTPUT_DIR)
mkdir $(OUTPUT_DIR_UNMINIFIED)

cleanAll: cleanDist
rm -rf $(LIBOPUS_DIR) $(LIBSPEEXDSP_DIR)

test:
# Tests need to run relative to `dist` folder for wasm file import
cd $(OUTPUT_DIR); node --expose-wasm ../test.js

.PHONY: test

$(LIBOPUS_DIR)/autogen.sh $(LIBSPEEXDSP_DIR)/autogen.sh:
git submodule update --init

$(LIBOPUS_OBJ): $(LIBOPUS_DIR)/autogen.sh
cd $(LIBOPUS_DIR); ./autogen.sh
cd $(LIBOPUS_DIR); emconfigure ./configure --disable-extra-programs --disable-doc --disable-intrinsics --disable-rtcd --disable-stack-protector
cd $(LIBOPUS_DIR); emmake make

$(LIBSPEEXDSP_OBJ): $(LIBSPEEXDSP_DIR)/autogen.sh
cd $(LIBSPEEXDSP_DIR); ./autogen.sh
cd $(LIBSPEEXDSP_DIR); emconfigure ./configure --disable-examples --disable-neon
cd $(LIBSPEEXDSP_DIR); emmake make

$(LIBOPUS_ENCODER): $(LIBOPUS_ENCODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
emcc -o $@ $(EMCC_OPTS) -s BINARYEN_ASYNC_COMPILATION=0 -s SINGLE_FILE=1 -g3 -s EXPORTED_FUNCTIONS="[$(DEFAULT_EXPORTS),$(LIBOPUS_ENCODER_EXPORTS),$(LIBSPEEXDSP_EXPORTS)]" --post-js $(LIBOPUS_ENCODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)

$(LIBOPUS_ENCODER_MIN): $(LIBOPUS_ENCODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
emcc -o $@ $(EMCC_OPTS) -s BINARYEN_ASYNC_COMPILATION=0 -s SINGLE_FILE=1 -s EXPORTED_FUNCTIONS="[$(DEFAULT_EXPORTS),$(LIBOPUS_ENCODER_EXPORTS),$(LIBSPEEXDSP_EXPORTS)]" --post-js $(LIBOPUS_ENCODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)

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

$(LIBOPUS_DECODER_MIN): $(LIBOPUS_DECODER_SRC) $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)
npm run webpack -- --config webpack.config.js -p --output-library DecoderWorker $(LIBOPUS_DECODER_SRC) -o $@
emcc -o $@ $(EMCC_OPTS) -s EXPORTED_FUNCTIONS="[$(DEFAULT_EXPORTS),$(LIBOPUS_DECODER_EXPORTS),$(LIBSPEEXDSP_EXPORTS)]" --pre-js $@ $(LIBOPUS_OBJ) $(LIBSPEEXDSP_OBJ)

$(RECORDER): $(RECORDER_SRC)
npm run webpack -- --config webpack.config.js -d --output-library Recorder $(RECORDER_SRC) -o $@

$(RECORDER_MIN): $(RECORDER_SRC)
npm run webpack -- --config webpack.config.js -p --output-library Recorder $(RECORDER_SRC) -o $@

$(WAVE_WORKER): $(WAVE_WORKER_SRC)
npm run webpack -- -d $(WAVE_WORKER_SRC) -o $@

$(WAVE_WORKER_MIN): $(WAVE_WORKER_SRC)
npm run webpack -- -p $(WAVE_WORKER_SRC) -o $@
Loading