├── download └── .gitkeep ├── deps ├── fdk-aac │ ├── m4 │ │ └── .gitkeep │ ├── MODULE_LICENSE_FRAUNHOFER │ ├── autogen.sh │ ├── OWNERS │ ├── METADATA │ ├── PREUPLOAD.cfg │ ├── documentation │ │ ├── aacDecoder.pdf │ │ └── aacEncoder.pdf │ ├── libFDK │ │ └── include │ │ │ └── ppc │ │ │ ├── clz_ppc.h │ │ │ └── fixmul_ppc.h │ ├── .clang-format │ ├── fdk-aac-config.cmake.in │ ├── fdk-aac.pc.in │ ├── fdk-aac.sym │ ├── fdk-aac.def │ ├── .gitignore │ ├── configure.ac │ ├── wavreader.h │ └── ChangeLog ├── lz4 │ ├── contrib │ │ ├── debian │ │ │ ├── docs │ │ │ ├── compat │ │ │ ├── dirs │ │ │ ├── liblz4.install │ │ │ ├── liblz4-dev.install │ │ │ ├── rules │ │ │ ├── copyright │ │ │ ├── changelog │ │ │ └── control │ │ ├── gen_manual │ │ │ ├── .gitignore │ │ │ ├── gen-lz4-manual.sh │ │ │ └── README.md │ │ ├── meson │ │ │ ├── meson │ │ │ │ ├── contrib │ │ │ │ │ ├── meson.build │ │ │ │ │ └── gen_manual │ │ │ │ │ │ └── meson.build │ │ │ │ ├── GetLz4LibraryVersion.py │ │ │ │ ├── examples │ │ │ │ │ └── meson.build │ │ │ │ ├── programs │ │ │ │ │ └── meson.build │ │ │ │ └── lib │ │ │ │ │ └── meson.build │ │ │ ├── meson.build │ │ │ ├── README.md │ │ │ └── meson_options.txt │ │ ├── djgpp │ │ │ ├── README.MD │ │ │ └── LICENSE │ │ └── snap │ │ │ ├── snapcraft.yaml │ │ │ └── README.md │ ├── lib │ │ ├── .gitignore │ │ ├── liblz4.pc.in │ │ ├── liblz4-dll.rc.in │ │ ├── dll │ │ │ └── example │ │ │ │ └── fullbench-dll.sln │ │ ├── LICENSE │ │ └── lz4frame_static.h │ ├── .cirrus.yml │ ├── build │ │ ├── cmake │ │ │ └── .gitignore │ │ ├── .gitignore │ │ ├── VS2010 │ │ │ ├── lz4 │ │ │ │ └── lz4.rc │ │ │ └── liblz4-dll │ │ │ │ └── liblz4-dll.rc │ │ └── VS2017 │ │ │ ├── lz4 │ │ │ └── lz4.rc │ │ │ └── liblz4-dll │ │ │ └── liblz4-dll.rc │ ├── examples │ │ ├── .gitignore │ │ ├── printVersion.c │ │ └── README.md │ ├── programs │ │ ├── .gitignore │ │ ├── lz4-exe.rc.in │ │ ├── bench.h │ │ └── datagen.h │ ├── tests │ │ ├── .gitignore │ │ ├── test_install.sh │ │ └── test_custom_block_sizes.sh │ ├── ossfuzz │ │ ├── lz4_helpers.h │ │ ├── ossfuzz.sh │ │ ├── travisoss.sh │ │ ├── fuzz_data_producer.h │ │ ├── round_trip_hc_fuzzer.c │ │ ├── round_trip_frame_fuzzer.c │ │ ├── compress_frame_fuzzer.c │ │ ├── fuzz.h │ │ ├── lz4_helpers.c │ │ ├── round_trip_fuzzer.c │ │ ├── standaloneengine.c │ │ └── compress_fuzzer.c │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE │ ├── INSTALL │ ├── .github │ │ └── ISSUE_TEMPLATE │ │ │ ├── feature_request.md │ │ │ └── bug_report.md │ ├── .circleci │ │ └── images │ │ │ └── primary │ │ │ └── Dockerfile │ ├── lz4.gyp │ └── Makefile.inc └── lame │ ├── debian │ ├── compat │ ├── lame.docs │ ├── lame.manpages │ ├── libmp3lame0.install │ ├── watch │ ├── lame.install │ ├── libmp3lame-dev.install │ ├── Makefile.am │ ├── rules │ └── control │ ├── mac │ ├── MacDLLMain.c │ ├── .DS_Store │ ├── LAME.mcp │ ├── Makefile.am │ ├── LAME_Carbon_Debug.pch │ ├── LAME_Classic_Debug.pch │ ├── LAME_Carbon_Final.pch │ ├── LAME_Classic_Final.pch │ └── Precompile_Common.h │ ├── ChangeLog │ ├── ACM │ ├── acm.rc │ ├── lame.ico │ ├── tinyxml │ │ ├── readme.txt │ │ ├── Makefile.am │ │ ├── makedistwin.bat │ │ ├── makedistlinux │ │ └── tinyxmlerror.cpp │ ├── ddk │ │ └── Makefile.am │ ├── ADbg │ │ └── Makefile.am │ ├── TODO │ ├── lame_acm.xml │ ├── Makefile.am │ ├── readme.txt │ ├── lameACM.def │ ├── adebug.h │ └── resource.h │ ├── Dll │ ├── README │ ├── MP3export.pas │ ├── Makefile.am │ ├── BladeMP3EncDLL.def │ └── Makefile.mingw32 │ ├── testcase.mp3 │ ├── testcase.wav │ ├── dshow │ ├── elogo.ico │ ├── Property.rc │ ├── Makefile.am │ ├── Mpegac.def │ ├── aboutprp.h │ ├── UIDS.H │ └── PropPage_adv.h │ ├── libmp3lame │ ├── logoe.ico │ ├── i386 │ │ ├── fft.nas │ │ ├── fftsse.nas │ │ ├── ffttbl.nas │ │ └── Makefile.am │ ├── lameerror.h │ ├── newmdct.h │ ├── vector │ │ ├── lame_intrin.h │ │ └── Makefile.am │ ├── vbrquantize.h │ ├── reservoir.h │ ├── fft.h │ ├── lame.rc │ ├── quantize.h │ ├── bitstream.h │ └── id3tag.h │ ├── macosx │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ └── Makefile.am │ ├── LAME_Prefix.pch │ ├── LAME.xcodeproj │ │ └── Makefile.am │ ├── Makefile.am │ └── Info.plist │ ├── doc │ ├── Makefile.am │ ├── man │ │ └── Makefile.am │ └── html │ │ └── Makefile.am │ ├── Makefile.am.global │ ├── vc_solution │ ├── Makefile.am │ ├── arch_x87.vsprops │ ├── arch_nasm.vsprops │ ├── arch_sse2.vsprops │ ├── vc9_lame_config.vsprops │ └── vc9_nasm.rules │ ├── include │ └── Makefile.am │ ├── config │ └── README │ ├── LICENSE │ ├── misc │ ├── Makefile.am │ ├── auenc │ ├── lame4dos.bat │ └── lameid3.pl │ ├── mpglib │ ├── AUTHORS │ ├── README │ ├── dct64_i386.h │ ├── tabinit.h │ ├── layer1.h │ ├── Makefile.am │ ├── layer2.h │ ├── layer3.h │ ├── decode_i386.h │ ├── common.h │ └── interface.h │ ├── frontend │ ├── parse.h │ ├── gtkanal.h │ ├── lametime.h │ ├── brhist.h │ ├── rtp.h │ ├── Makefile.am │ ├── mp3x.c │ ├── timestatus.h │ └── console.h │ ├── DEFINES │ ├── lame.bat │ ├── README │ └── Makefile.am ├── .gitattributes ├── index.js ├── util ├── util.js ├── lz4.js └── proxy.js ├── lib ├── core.js ├── lib.js ├── movie.js └── config.js ├── src ├── InstanceData.h ├── EncodeData.h ├── wasm │ ├── wrap.js │ └── binding.cpp ├── lz4dec.h ├── wav.h ├── LameAsyncWorker.h ├── lz4dec.c └── EncodeWorker.hpp ├── .gitignore ├── script ├── before-publish.js ├── build.sh ├── before-deploy.js └── build.bat ├── .npmignore ├── .eslintrc.json ├── test └── check.test.js ├── .vscode ├── launch.json └── settings.json ├── common.gypi ├── binding.gyp ├── LICENSE.md ├── cgen.config.js ├── package.json └── README.md /download/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/fdk-aac/m4/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/docs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/lame/debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /deps/fdk-aac/MODULE_LICENSE_FRAUNHOFER: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/lame/debian/lame.docs: -------------------------------------------------------------------------------- 1 | USAGE 2 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | deps/**/* linguist-vendored 2 | -------------------------------------------------------------------------------- /deps/lame/debian/lame.manpages: -------------------------------------------------------------------------------- 1 | doc/man/lame.1 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/lib.js') 2 | -------------------------------------------------------------------------------- /deps/fdk-aac/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | autoreconf -fiv 3 | -------------------------------------------------------------------------------- /deps/fdk-aac/OWNERS: -------------------------------------------------------------------------------- 1 | jmtrivi@google.com 2 | gkasten@android.com 3 | -------------------------------------------------------------------------------- /deps/lame/debian/libmp3lame0.install: -------------------------------------------------------------------------------- 1 | usr/lib/libmp3lame.so.* 2 | -------------------------------------------------------------------------------- /deps/lz4/lib/.gitignore: -------------------------------------------------------------------------------- 1 | # make install artefact 2 | liblz4.pc 3 | -------------------------------------------------------------------------------- /deps/lame/mac/MacDLLMain.c: -------------------------------------------------------------------------------- 1 | /* MacDLLMain.c */ int main() { return 0; } -------------------------------------------------------------------------------- /deps/lame/debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | http://sf.net/lame/lame-(.*).tar.gz 3 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/liblz4.install: -------------------------------------------------------------------------------- 1 | usr/lib/liblz4.so.* 2 | usr/bin/* 3 | -------------------------------------------------------------------------------- /deps/lz4/contrib/gen_manual/.gitignore: -------------------------------------------------------------------------------- 1 | # build artefact 2 | gen_manual 3 | -------------------------------------------------------------------------------- /deps/fdk-aac/METADATA: -------------------------------------------------------------------------------- 1 | third_party { 2 | license_type: BY_EXCEPTION_ONLY 3 | } 4 | -------------------------------------------------------------------------------- /deps/lame/debian/lame.install: -------------------------------------------------------------------------------- 1 | usr/bin/lame 2 | usr/share/doc/lame/html/*.html 3 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/liblz4-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/lz4* 2 | usr/lib/liblz4.so 3 | -------------------------------------------------------------------------------- /deps/lame/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/ChangeLog -------------------------------------------------------------------------------- /deps/lame/ACM/acm.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/ACM/acm.rc -------------------------------------------------------------------------------- /deps/lame/Dll/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/Dll/README -------------------------------------------------------------------------------- /deps/lame/ACM/lame.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/ACM/lame.ico -------------------------------------------------------------------------------- /deps/lame/mac/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/mac/.DS_Store -------------------------------------------------------------------------------- /deps/lame/mac/LAME.mcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/mac/LAME.mcp -------------------------------------------------------------------------------- /deps/lame/testcase.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/testcase.mp3 -------------------------------------------------------------------------------- /deps/lame/testcase.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/testcase.wav -------------------------------------------------------------------------------- /deps/lame/dshow/elogo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/dshow/elogo.ico -------------------------------------------------------------------------------- /util/util.js: -------------------------------------------------------------------------------- 1 | exports.Lz4 = require('./lz4.js') 2 | exports.unpackTexture2D = require('./unpackTexture2D.js') 3 | -------------------------------------------------------------------------------- /deps/lame/Dll/MP3export.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/Dll/MP3export.pas -------------------------------------------------------------------------------- /deps/lame/debian/libmp3lame-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/lame/lame.h 2 | usr/lib/*.{a,la} 3 | usr/lib/libmp3lame*.so 4 | -------------------------------------------------------------------------------- /deps/lame/dshow/Property.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/dshow/Property.rc -------------------------------------------------------------------------------- /deps/fdk-aac/PREUPLOAD.cfg: -------------------------------------------------------------------------------- 1 | [Hook Scripts] 2 | mainline_hook = ${REPO_ROOT}/frameworks/av/tools/mainline_hook_project.sh 3 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/logoe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/libmp3lame/logoe.ico -------------------------------------------------------------------------------- /deps/lame/ACM/tinyxml/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/ACM/tinyxml/readme.txt -------------------------------------------------------------------------------- /deps/lame/libmp3lame/i386/fft.nas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/libmp3lame/i386/fft.nas -------------------------------------------------------------------------------- /deps/lame/libmp3lame/i386/fftsse.nas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/libmp3lame/i386/fftsse.nas -------------------------------------------------------------------------------- /deps/lame/libmp3lame/i386/ffttbl.nas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/libmp3lame/i386/ffttbl.nas -------------------------------------------------------------------------------- /deps/fdk-aac/documentation/aacDecoder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/fdk-aac/documentation/aacDecoder.pdf -------------------------------------------------------------------------------- /deps/fdk-aac/documentation/aacEncoder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/fdk-aac/documentation/aacEncoder.pdf -------------------------------------------------------------------------------- /deps/fdk-aac/libFDK/include/ppc/clz_ppc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/fdk-aac/libFDK/include/ppc/clz_ppc.h -------------------------------------------------------------------------------- /deps/lz4/.cirrus.yml: -------------------------------------------------------------------------------- 1 | freebsd_instance: 2 | image_family: freebsd-12-1 3 | 4 | task: 5 | script: pkg install -y gmake && gmake test 6 | -------------------------------------------------------------------------------- /deps/fdk-aac/libFDK/include/ppc/fixmul_ppc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/fdk-aac/libFDK/include/ppc/fixmul_ppc.h -------------------------------------------------------------------------------- /lib/core.js: -------------------------------------------------------------------------------- 1 | let core 2 | try { 3 | core = require('../dist/core.node') 4 | } catch (_) { 5 | core = null 6 | } 7 | 8 | module.exports = core 9 | -------------------------------------------------------------------------------- /deps/lame/macosx/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toyobayashi/mishiro-core/HEAD/deps/lame/macosx/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /deps/fdk-aac/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | SortIncludes: false 3 | # Do not reformat the Doxygen-style comments in the code 4 | CommentPragmas : "^ * \\\\" 5 | -------------------------------------------------------------------------------- /deps/fdk-aac/fdk-aac-config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(${CMAKE_CURRENT_LIST_DIR}/fdk-aac-targets.cmake) 4 | 5 | check_required_components(FDK-AAC) 6 | -------------------------------------------------------------------------------- /deps/lame/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.2 2001/01/15 15:16:08 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | SUBDIRS = html man 6 | -------------------------------------------------------------------------------- /deps/lz4/build/cmake/.gitignore: -------------------------------------------------------------------------------- 1 | # cmake artefact 2 | 3 | CMakeCache.txt 4 | CMakeFiles 5 | *.cmake 6 | Makefile 7 | liblz4.pc 8 | lz4c 9 | install_manifest.txt 10 | -------------------------------------------------------------------------------- /deps/lame/ACM/ddk/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.1 2003/12/09 15:48:37 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | msacmdrv.h 7 | -------------------------------------------------------------------------------- /src/InstanceData.h: -------------------------------------------------------------------------------- 1 | #ifndef __INSTANCE_DATA_H__ 2 | #define __INSTANCE_DATA_H__ 3 | 4 | typedef struct AddonGlobalData { 5 | bool progressCallback; 6 | } AddonGlobalData; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /download/* 3 | !/download/.gitkeep 4 | /build 5 | /release 6 | /dist 7 | 8 | .local 9 | .cgenbuild 10 | CMakeLists.txt 11 | /*.zip 12 | package-lock.json 13 | -------------------------------------------------------------------------------- /src/EncodeData.h: -------------------------------------------------------------------------------- 1 | #ifndef __ENCODE_DATA_H__ 2 | #define __ENCODE_DATA_H__ 3 | 4 | typedef struct EncodeData { 5 | double total; 6 | double loaded; 7 | } EncodeData; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /deps/lame/doc/man/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.1 2000/10/22 11:39:44 aleidinger Exp $ 2 | 3 | AUTOMAKE_OPTIONS = foreign ansi2knr 4 | 5 | man_MANS = lame.1 6 | EXTRA_DIST = ${man_MANS} 7 | 8 | -------------------------------------------------------------------------------- /deps/lame/macosx/LAME_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'LAME' target in the 'LAME' project. 3 | // 4 | 5 | #include 6 | 7 | #define HAVE_CONFIG_H 8 | -------------------------------------------------------------------------------- /deps/lame/ACM/ADbg/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.3 2008/11/09 13:50:16 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | ADbg.cpp \ 7 | ADbg.h 8 | 9 | -------------------------------------------------------------------------------- /deps/lame/macosx/English.lproj/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.1 2008/05/24 08:28:58 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | InfoPlist.strings 7 | 8 | -------------------------------------------------------------------------------- /deps/lame/macosx/LAME.xcodeproj/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.1 2008/05/24 08:28:58 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | project.pbxproj 7 | 8 | -------------------------------------------------------------------------------- /deps/lame/Makefile.am.global: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am.global,v 1.8 2011/06/17 06:22:46 aleidinger Exp $ 2 | 3 | # global section for every Makefile.am 4 | 5 | AUTOMAKE_OPTIONS = 1.11 foreign 6 | 7 | # end global section 8 | -------------------------------------------------------------------------------- /deps/lame/vc_solution/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.2 2010/03/14 17:23:35 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = *.sln \ 6 | *.vcproj \ 7 | *.vsprops \ 8 | *.rules 9 | -------------------------------------------------------------------------------- /deps/lz4/examples/.gitignore: -------------------------------------------------------------------------------- 1 | /Makefile.lz4* 2 | /printVersion 3 | /doubleBuffer 4 | /dictionaryRandomAccess 5 | /ringBuffer 6 | /ringBufferHC 7 | /lineCompress 8 | /frameCompress 9 | /simpleBuffer 10 | /*.exe 11 | -------------------------------------------------------------------------------- /deps/lame/include/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.4 2010/03/14 17:23:35 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | pkginclude_HEADERS = lame.h 6 | 7 | EXTRA_DIST = lame.def libmp3lame.sym 8 | 9 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | include /usr/share/cdbs/1/rules/debhelper.mk 4 | include /usr/share/cdbs/1/class/cmake.mk 5 | 6 | 7 | DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_BUILD_TYPE=RelWithDebInfo ../../build/cmake 8 | -------------------------------------------------------------------------------- /deps/lz4/build/.gitignore: -------------------------------------------------------------------------------- 1 | # Visual C++ 2 | .vs/ 3 | *Copy 4 | *.db 5 | *.opensdf 6 | *.sdf 7 | *.suo 8 | *.user 9 | ver*/ 10 | VS2010/bin/ 11 | VS2017/bin/ 12 | ipch 13 | 14 | # Fixup for lz4 project directories 15 | !VS2010/lz4 16 | !VS2017/lz4 17 | -------------------------------------------------------------------------------- /deps/lame/macosx/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.2 2008/05/24 08:28:58 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | SUBDIRS = English.lproj LAME.xcodeproj 6 | 7 | 8 | EXTRA_DIST = \ 9 | Info.plist \ 10 | LAME_Prefix.pch 11 | -------------------------------------------------------------------------------- /script/before-publish.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs-extra') 3 | 4 | fs.writeFileSync(path.join(__dirname, '../.npmrc'), `//registry.npmjs.org/:_authToken=\${NPMTOKEN} 5 | registry=https://registry.npmjs.org/ 6 | always-auth=true 7 | `, 'utf8') 8 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | node_modules 3 | .eslintrc.json 4 | .travis* 5 | /download 6 | /test 7 | /script 8 | /build 9 | /release 10 | /dist/*.node 11 | .github 12 | .gitattributes 13 | 14 | .local 15 | .cgenbuild 16 | CMakeLists.txt 17 | /*.zip 18 | cgen.config.* 19 | /src/wasm 20 | -------------------------------------------------------------------------------- /deps/lz4/programs/.gitignore: -------------------------------------------------------------------------------- 1 | # local binary (Makefile) 2 | lz4 3 | unlz4 4 | lz4cat 5 | lz4c 6 | lz4c32 7 | lz4-wlib 8 | datagen 9 | frametest 10 | frametest32 11 | fullbench 12 | fullbench32 13 | fuzzer 14 | fuzzer32 15 | *.exe 16 | 17 | # tests files 18 | tmp* 19 | 20 | # artefacts 21 | *.dSYM 22 | -------------------------------------------------------------------------------- /deps/lame/config/README: -------------------------------------------------------------------------------- 1 | 2 | The "config.h" file on each platform is generated with these flags: 3 | 4 | ./configure --enable-static --disable-shared --with-pic --disable-rpath --disable-frontend --disable-gtktest 5 | 6 | On Windows, the "config.h" file is simply the "configMS.h" file in the root of the lame repo 7 | -------------------------------------------------------------------------------- /deps/lame/Dll/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.11 2010/10/30 13:21:02 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = BladeMP3EncDLL.c \ 6 | BladeMP3EncDLL.def \ 7 | BladeMP3EncDLL.h \ 8 | Example.cpp \ 9 | LameDLLInterface.htm \ 10 | MP3export.pas \ 11 | Makefile.mingw32 12 | -------------------------------------------------------------------------------- /deps/lame/vc_solution/arch_x87.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /deps/lz4/tests/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # build artefacts 3 | datagen 4 | frametest 5 | frametest32 6 | fullbench 7 | fullbench32 8 | fuzzer 9 | fuzzer32 10 | fasttest 11 | roundTripTest 12 | checkTag 13 | checkFrame 14 | decompress-partial 15 | 16 | # test artefacts 17 | tmp* 18 | versionsTest 19 | lz4_all.c 20 | 21 | # local tests 22 | afl 23 | -------------------------------------------------------------------------------- /deps/fdk-aac/fdk-aac.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: Fraunhofer FDK AAC Codec Library 7 | Description: AAC codec library 8 | Version: @PACKAGE_VERSION@ 9 | Libs: -L${libdir} -lfdk-aac @LIBS_PUBLIC@ 10 | Libs.private: @LIBS_PRIVATE@ 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /src/wasm/wrap.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | exports.transcodeAac = function (input, output, bitRate = 160000) { 4 | return Module.transcodeAac(input, output, bitRate) === 0 5 | } 6 | 7 | /* exports.transcoding = function (input, output, bitRate = 128000) { 8 | return Module.transcoding(input, output, bitRate) === 0 9 | } */ 10 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "node": true 6 | }, 7 | "extends": "standard", 8 | "parserOptions": { 9 | "sourceType": "module" 10 | }, 11 | "rules": { 12 | "eqeqeq": 0, 13 | "no-irregular-whitespace": 0, 14 | "no-new": 0, 15 | "quote-props": 0 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/lib.js: -------------------------------------------------------------------------------- 1 | exports.util = require('../util/util.js') 2 | 3 | exports.Client = require('./client.js') 4 | exports.Downloader = require('./downloader.js').Downloader 5 | exports.ResourceType = require('./downloader.js').ResourceType 6 | exports.audio = require('./audio.js') 7 | exports.config = require('./config.js') 8 | exports.movie = require('./movie') 9 | -------------------------------------------------------------------------------- /deps/lz4/examples/printVersion.c: -------------------------------------------------------------------------------- 1 | // LZ4 trivial example : print Library version number 2 | // by Takayuki Matsuoka 3 | 4 | 5 | #include 6 | #include "lz4.h" 7 | 8 | int main(int argc, char** argv) 9 | { 10 | (void)argc; (void)argv; 11 | printf("Hello World ! LZ4 Library version = %d\n", LZ4_versionNumber()); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /deps/lame/mac/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.1 2002/05/28 07:52:10 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | .DS_Store \ 7 | LAME.mcp \ 8 | LAME_Carbon_Debug.pch \ 9 | LAME_Carbon_Final.pch \ 10 | LAME_Classic_Debug.pch \ 11 | LAME_Classic_Final.pch \ 12 | MacDLLMain.c \ 13 | Precompile_Common.h 14 | -------------------------------------------------------------------------------- /deps/lame/vc_solution/arch_nasm.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /deps/lz4/examples/README.md: -------------------------------------------------------------------------------- 1 | # LZ4 examples 2 | 3 | All examples are GPL-v2 licensed. 4 | 5 | ## Documents 6 | 7 | - [Streaming API Basics](streaming_api_basics.md) 8 | - Examples 9 | - [Double Buffer](blockStreaming_doubleBuffer.md) 10 | - [Line by Line Text Compression](blockStreaming_lineByLine.md) 11 | - [Dictionary Random Access](dictionaryRandomAccess.md) 12 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: liblz4 3 | Upstream-Contact: Yann Collet 4 | Source: https://github.com/lz4/lz4 5 | 6 | Files: * 7 | Copyright: (C) 2011-2020 Yann Collet 8 | License: GPL-2+ 9 | The full text of license: https://github.com/lz4/lz4/blob/dev/lib/LICENSE 10 | -------------------------------------------------------------------------------- /deps/lame/ACM/tinyxml/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.3 2008/11/09 13:50:16 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | Makefile.tinyxml \ 7 | changes.txt \ 8 | dox \ 9 | makedistlinux \ 10 | makedistwin.bat \ 11 | readme.txt \ 12 | tinyxml.cpp \ 13 | tinyxml.h \ 14 | tinyxmlerror.cpp \ 15 | tinyxmlparser.cpp \ 16 | xmltest.cpp 17 | -------------------------------------------------------------------------------- /deps/lame/vc_solution/arch_sse2.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /src/lz4dec.h: -------------------------------------------------------------------------------- 1 | #ifndef __CORE_LZ4DEC_H__ 2 | #define __CORE_LZ4DEC_H__ 3 | 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | uint32_t lz4_get_uncompressed_size(const uint8_t* buf, size_t buflen); 12 | int lz4_dec_buffer(const uint8_t* buf, size_t buflen, uint8_t* out, size_t outlen); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/lz4_helpers.h: -------------------------------------------------------------------------------- 1 | #ifndef LZ4_HELPERS 2 | #define LZ4_HELPERS 3 | 4 | #include "lz4frame.h" 5 | 6 | LZ4F_frameInfo_t FUZZ_randomFrameInfo(uint32_t* seed); 7 | 8 | LZ4F_preferences_t FUZZ_randomPreferences(uint32_t* seed); 9 | 10 | size_t FUZZ_decompressFrame(void* dst, const size_t dstCapacity, 11 | const void* src, const size_t srcSize); 12 | 13 | #endif /* LZ4_HELPERS */ 14 | -------------------------------------------------------------------------------- /deps/fdk-aac/fdk-aac.sym: -------------------------------------------------------------------------------- 1 | aacDecoder_AncDataGet 2 | aacDecoder_AncDataInit 3 | aacDecoder_Close 4 | aacDecoder_ConfigRaw 5 | aacDecoder_DecodeFrame 6 | aacDecoder_Fill 7 | aacDecoder_GetFreeBytes 8 | aacDecoder_GetLibInfo 9 | aacDecoder_GetStreamInfo 10 | aacDecoder_Open 11 | aacDecoder_SetParam 12 | aacEncClose 13 | aacEncEncode 14 | aacEncGetLibInfo 15 | aacEncInfo 16 | aacEncOpen 17 | aacEncoder_GetParam 18 | aacEncoder_SetParam 19 | -------------------------------------------------------------------------------- /deps/lame/ACM/TODO: -------------------------------------------------------------------------------- 1 | - known bug : when recording, converting, and recording a lame_close() call fail 2 | - allow decompression the same way as in the command-line 3 | - allow VBR mode 4 | - allow channel resampling (mono to stereo / stereo to mono) 5 | - allow internal resampling (difference in the format suggestion) 6 | - use global pointers for string 7 | - use the bitrate/freq tables from LAME 8 | 9 | / add the decoding engine 10 | -------------------------------------------------------------------------------- /deps/lame/debian/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.8 2011/10/15 14:31:09 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | changelog \ 7 | compat \ 8 | control \ 9 | copyright \ 10 | libmp3lame-dev.install \ 11 | libmp3lame0.install \ 12 | lame.docs \ 13 | lame.install \ 14 | lame.manpages \ 15 | rules \ 16 | watch 17 | 18 | dist-hook: 19 | chmod +x $(distdir)/rules 20 | 21 | -------------------------------------------------------------------------------- /deps/lame/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | %: 4 | dh $@ --parallel 5 | 6 | CFLAGS += -g -Wall -Wextra 7 | LDFLAGS += -Wl,-O1 -Wl,-z,defs -Wl,--as-needed 8 | 9 | override_dh_auto_configure: 10 | dh_auto_configure -- \ 11 | --with-fileio=sndfile \ 12 | --enable-nasm \ 13 | --with-pic \ 14 | --disable-mp3x \ 15 | --disable-mp3rtp \ 16 | --disable-gtktest \ 17 | --enable-dynamic-frontends \ 18 | --enable-expopt=full 19 | -------------------------------------------------------------------------------- /deps/lame/ACM/tinyxml/makedistwin.bat: -------------------------------------------------------------------------------- 1 | del .\tinyxml_win\*.* 2 | del .\docs\*.* 3 | 4 | doxygen dox 5 | mkdir tinyxml_win 6 | 7 | copy readme.txt tinyxml_win 8 | copy changes.txt tinyxml_win 9 | 10 | copy *.cpp tinyxml_win 11 | copy *.h tinyxml_win 12 | copy *.dsp tinyxml_win 13 | copy test0.xml tinyxml_win 14 | copy test1.xml tinyxml_win 15 | copy test2.xml tinyxml_win 16 | 17 | mkdir .\tinyxml_win\docs 18 | copy docs .\tinyxml_win\docs 19 | 20 | -------------------------------------------------------------------------------- /deps/lz4/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior 2 | * text eol=lf 3 | 4 | # Explicitly declare source files 5 | *.c text eol=lf 6 | *.h text eol=lf 7 | 8 | # Denote files that should not be modified. 9 | *.odt binary 10 | *.png binary 11 | 12 | # Visual Studio 13 | *.sln text eol=crlf 14 | *.vcxproj* text eol=crlf 15 | *.vcproj* text eol=crlf 16 | *.suo binary 17 | *.rc text eol=crlf 18 | 19 | # Windows 20 | *.bat text eol=crlf 21 | *.cmd text eol=crlf 22 | -------------------------------------------------------------------------------- /deps/lz4/lib/liblz4.pc.in: -------------------------------------------------------------------------------- 1 | # LZ4 - Fast LZ compression algorithm 2 | # Copyright (C) 2011-2014, Yann Collet. 3 | # BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 4 | 5 | prefix=@PREFIX@ 6 | libdir=@LIBDIR@ 7 | includedir=@INCLUDEDIR@ 8 | 9 | Name: lz4 10 | Description: extremely fast lossless compression algorithm library 11 | URL: http://www.lz4.org/ 12 | Version: @VERSION@ 13 | Libs: -L@LIBDIR@ -llz4 14 | Cflags: -I@INCLUDEDIR@ 15 | -------------------------------------------------------------------------------- /deps/lame/ACM/lame_acm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/check.test.js: -------------------------------------------------------------------------------- 1 | const { describe, it } = require('mocha') 2 | const assert = require('assert') 3 | const cgss = require('..') 4 | 5 | describe('Version Check', () => { 6 | it('have new version', async function () { 7 | this.skip() 8 | this.timeout(10000) 9 | const client = new cgss.Client('940464243:174481488:cf608be5-6d38-421a-8eb1-11a501132c0a') 10 | const resver = await client.check() 11 | console.log(resver) 12 | assert.ok(resver) 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /util/lz4.js: -------------------------------------------------------------------------------- 1 | const core = require('../lib/core.js') 2 | const fs = require('fs-extra') 3 | 4 | class Lz4 { 5 | static decompress (input, output = '.unity3d') { 6 | if (!core) throw new Error('failed to load core.node.') 7 | if (Buffer.isBuffer(input)) { 8 | return core.lz4dec(input) 9 | } 10 | const buf = core.lz4dec(fs.readFileSync(input)) 11 | fs.writeFileSync(input + output, buf) 12 | return input + output 13 | } 14 | } 15 | 16 | module.exports = Lz4 17 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "(Windows) Attach", 6 | "type": "cppvsdbg", 7 | "request": "attach", 8 | "processId": "${command:pickProcess}" 9 | }, 10 | { 11 | "type": "node", 12 | "request": "launch", 13 | "name": "Debug", 14 | "program": "${workspaceFolder}/node_modules/mocha/bin/mocha", 15 | "args": [ 16 | "./test/audio.test.js" 17 | ] 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /deps/fdk-aac/fdk-aac.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | aacDecoder_AncDataGet 3 | aacDecoder_AncDataInit 4 | aacDecoder_Close 5 | aacDecoder_ConfigRaw 6 | aacDecoder_DecodeFrame 7 | aacDecoder_Fill 8 | aacDecoder_GetFreeBytes 9 | aacDecoder_GetLibInfo 10 | aacDecoder_GetStreamInfo 11 | aacDecoder_Open 12 | aacDecoder_SetParam 13 | aacEncClose 14 | aacEncEncode 15 | aacEncGetLibInfo 16 | aacEncInfo 17 | aacEncOpen 18 | aacEncoder_GetParam 19 | aacEncoder_SetParam 20 | -------------------------------------------------------------------------------- /deps/lame/dshow/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.6 2008/11/09 13:50:16 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_DIST = \ 6 | Encoder.cpp \ 7 | Encoder.h \ 8 | Mpegac.cpp \ 9 | Mpegac.def \ 10 | Mpegac.h \ 11 | PropPage.cpp \ 12 | PropPage.h \ 13 | PropPage_adv.cpp \ 14 | PropPage_adv.h \ 15 | Property.rc \ 16 | README \ 17 | REG.CPP \ 18 | REG.H \ 19 | UIDS.H \ 20 | aboutprp.cpp \ 21 | aboutprp.h \ 22 | elogo.ico \ 23 | iaudioprops.h \ 24 | resource.h 25 | 26 | -------------------------------------------------------------------------------- /deps/lame/LICENSE: -------------------------------------------------------------------------------- 1 | Can I use LAME in my commercial program? 2 | 3 | Yes, you can, under the restrictions of the LGPL. The easiest 4 | way to do this is to: 5 | 6 | 1. Link to LAME as separate library (libmp3lame.a on unix or 7 | lame_enc.dll or libmp3lame.dll on windows) 8 | 9 | 2. Fully acknowledge that you are using LAME, and give a link 10 | to our web site, www.mp3dev.org 11 | 12 | 3. If you make modifications to LAME, you *must* release these 13 | these modifications back to the LAME project, under the LGPL. 14 | -------------------------------------------------------------------------------- /deps/lz4/.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | 5 | # Libraries 6 | *.lib 7 | *.a 8 | 9 | # Shared objects (inc. Windows DLLs) 10 | *.dll 11 | *.so 12 | *.so.* 13 | *.dylib 14 | *.dSYM # apple 15 | 16 | # Executables 17 | *.exe 18 | *.out 19 | *.app 20 | lz4 21 | 22 | # IDE / editors files 23 | .clang_complete 24 | _codelite/ 25 | _codelite_lz4/ 26 | bin/ 27 | *.zip 28 | 29 | # analyzers 30 | infer-out 31 | 32 | # Mac 33 | .DS_Store 34 | *.dSYM 35 | 36 | # Windows / Msys 37 | nul 38 | ld.exe* 39 | 40 | # test files 41 | *.lz4 42 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/changelog: -------------------------------------------------------------------------------- 1 | liblz4 (1.7.2) unstable; urgency=low 2 | 3 | * Changed : moved to versioning; package, cli and library have same version number 4 | * Improved: Small decompression speed boost (+4%) 5 | * Improved: Performance on ARMv6 and ARMv7 6 | * Added : Debianization, by Evgeniy Polyakov 7 | * Makefile: Generates object files (*.o) for faster (re)compilation on low power systems 8 | * Fix : cli : crash on some invalid inputs 9 | 10 | -- Yann Collet Sun, 28 Jun 2015 01:00:00 +0000 11 | -------------------------------------------------------------------------------- /deps/lame/ACM/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.7 2008/11/09 13:50:16 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | SUBDIRS = ADbg ddk tinyxml 6 | 7 | EXTRA_DIST = \ 8 | ACM.cpp \ 9 | ACM.h \ 10 | ACMStream.cpp \ 11 | ACMStream.h \ 12 | AEncodeProperties.cpp \ 13 | AEncodeProperties.h \ 14 | DecodeStream.cpp \ 15 | DecodeStream.h \ 16 | LameACM.inf \ 17 | TODO \ 18 | acm.rc \ 19 | adebug.h \ 20 | lame.ico \ 21 | lameACM.def \ 22 | lame_acm.xml \ 23 | main.cpp \ 24 | readme.txt \ 25 | resource.h 26 | 27 | -------------------------------------------------------------------------------- /deps/lame/misc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.11 2011/11/05 16:32:13 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | EXTRA_PROGRAMS = abx ath scalartest 6 | 7 | CLEANFILES = $(EXTRA_PROGRAMS) 8 | 9 | EXTRA_SCRIPTS = \ 10 | auenc \ 11 | lameid3.pl \ 12 | mugeco.sh \ 13 | mlame \ 14 | mk_mp3.sh 15 | 16 | EXTRA_DIST = \ 17 | $(EXTRA_SCRIPTS) \ 18 | Lame.vbs \ 19 | lameGUI.html \ 20 | lame4dos.bat \ 21 | mlame_corr.c 22 | 23 | abx_SOURCES = abx.c 24 | 25 | ath_SOURCES = ath.c 26 | 27 | scalartest_SOURCES = scalartest.c 28 | 29 | -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/meson/contrib/meson.build: -------------------------------------------------------------------------------- 1 | # ############################################################################# 2 | # Copyright (c) 2018-present lzutao 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ############################################################################# 9 | 10 | subdir('gen_manual') 11 | -------------------------------------------------------------------------------- /deps/lz4/LICENSE: -------------------------------------------------------------------------------- 1 | This repository uses 2 different licenses : 2 | - all files in the `lib` directory use a BSD 2-Clause license 3 | - all other files use a GPLv2 license, unless explicitly stated otherwise 4 | 5 | Relevant license is reminded at the top of each source file, 6 | and with presence of COPYING or LICENSE file in associated directories. 7 | 8 | This model is selected to emphasize that 9 | files in the `lib` directory are designed to be included into 3rd party applications, 10 | while all other files, in `programs`, `tests` or `examples`, 11 | receive more limited attention and support for such scenario. 12 | -------------------------------------------------------------------------------- /deps/lame/doc/html/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $ 2 | 3 | AUTOMAKE_OPTIONS = foreign ansi2knr 4 | 5 | docdir = $(datadir)/doc 6 | pkgdocdir = $(docdir)/$(PACKAGE) 7 | htmldir = $(docdir)/html 8 | pkghtmldir = $(pkgdocdir)/html 9 | 10 | pkghtml_DATA = \ 11 | about.html \ 12 | abr.html \ 13 | cbr.html \ 14 | contact.html \ 15 | contributors.html \ 16 | detailed.html \ 17 | history.html \ 18 | index.html \ 19 | introduction.html \ 20 | links.html \ 21 | list.html \ 22 | ms_stereo.html \ 23 | usage.html \ 24 | vbr.html 25 | 26 | EXTRA_DIST = $(pkghtml_DATA) 27 | 28 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/ossfuzz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | # This script is called by the oss-fuzz main project when compiling the fuzz 4 | # targets. This script is regression tested by travisoss.sh. 5 | 6 | # Save off the current folder as the build root. 7 | export BUILD_ROOT=$PWD 8 | 9 | echo "CC: $CC" 10 | echo "CXX: $CXX" 11 | echo "LIB_FUZZING_ENGINE: $LIB_FUZZING_ENGINE" 12 | echo "CFLAGS: $CFLAGS" 13 | echo "CXXFLAGS: $CXXFLAGS" 14 | echo "OUT: $OUT" 15 | 16 | export MAKEFLAGS+="-j$(nproc)" 17 | 18 | pushd ossfuzz 19 | make V=1 all 20 | popd 21 | 22 | # Copy the fuzzers to the target directory. 23 | cp -v ossfuzz/*_fuzzer $OUT/ 24 | -------------------------------------------------------------------------------- /script/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # npm install -g node-gyp@9 4 | # npm config set node_gyp "`npm prefix -g`/lib/node_modules/node-gyp/bin/node-gyp.js" 5 | # node-gyp install 6 | npm install 7 | 8 | # curl -O -L https://github.com/toyobayashi/wasm-ffmpeg/releases/download/n4.4-1/ffmpeg-wasm-n4.4-1.zip 9 | # mkdir -p ./.local 10 | # unzip ffmpeg-wasm-n4.4-1.zip -d ./.local 11 | # cp -rpf ./.local/* $EMSDK/upstream/emscripten/system/local 12 | # npm run build:wasm 13 | # if [ "$?" -ne 0 ]; then exit $?; fi 14 | 15 | # mkdir -p ./dist 16 | # cp -rpf ./.cgenbuild/Release/audio.js ./dist/ 17 | # cp -rpf ./.cgenbuild/Release/audio.wasm ./dist/ 18 | -------------------------------------------------------------------------------- /script/before-deploy.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs-extra') 3 | 4 | const getPath = (...args) => { 5 | return path.join(__dirname, '..', ...args) 6 | } 7 | 8 | const nodeVersion = process.versions.node.replace(/\./g, '_') 9 | const arch = process.arch 10 | const platform = process.platform 11 | 12 | // const packageVersion = require(getPath('package.json')).version 13 | 14 | if (fs.existsSync(getPath('dist/core.node'))) { 15 | fs.mkdirsSync(getPath('release')) 16 | fs.copySync( 17 | getPath('dist/core.node'), 18 | getPath(`release/core-${require('../package.json').version}-${platform}-${arch}-${nodeVersion}.node`) 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /deps/lame/mpglib/AUTHORS: -------------------------------------------------------------------------------- 1 | Michael Hipp Author of orignal mpglib version 0.2a. 2 | 3 | Albert L. Faber 4 | Aleksander Korzynski 5 | Alexander Leidinger 6 | Frank Klemm 7 | Gabriel Bouvigne 8 | Leigh Smith 9 | Mark Taylor 10 | Myers Carpenter 11 | Naoki Shibata 12 | Robert Hegemann 13 | Sigbjorn Skjaeret 14 | Stefan Bellon 15 | Steve Lhomme 16 | Takehiro TOMINAGA 17 | -------------------------------------------------------------------------------- /deps/lz4/contrib/gen_manual/gen-lz4-manual.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | LIBVER_MAJOR_SCRIPT=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h` 4 | LIBVER_MINOR_SCRIPT=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h` 5 | LIBVER_PATCH_SCRIPT=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h` 6 | LIBVER_SCRIPT=$LIBVER_MAJOR_SCRIPT.$LIBVER_MINOR_SCRIPT.$LIBVER_PATCH_SCRIPT 7 | 8 | echo LZ4_VERSION=$LIBVER_SCRIPT 9 | ./gen_manual "lz4 $LIBVER_SCRIPT" ../../lib/lz4.h ./lz4_manual.html 10 | ./gen_manual "lz4frame $LIBVER_SCRIPT" ../../lib/lz4frame.h ./lz4frame_manual.html 11 | -------------------------------------------------------------------------------- /deps/fdk-aac/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.lo 3 | *.la 4 | .deps 5 | .libs 6 | .dirstamp 7 | Makefile 8 | Makefile.in 9 | aclocal.m4 10 | autom4te.cache 11 | configure 12 | fdk-aac.pc 13 | config.guess 14 | config.log 15 | config.status 16 | config.sub 17 | depcomp 18 | install-sh 19 | libtool 20 | ltmain.sh 21 | m4/libtool.m4 22 | m4/ltoptions.m4 23 | m4/ltsugar.m4 24 | m4/ltversion.m4 25 | m4/lt~obsolete.m4 26 | missing 27 | stamp-h1 28 | aac-enc 29 | compile 30 | 31 | CMakeCache.txt 32 | CMakeFiles 33 | CMakeScripts 34 | Testing 35 | cmake_install.cmake 36 | install_manifest.txt 37 | compile_commands.json 38 | CTestTestfile.cmake 39 | CMakeSettings.json 40 | 41 | *[Bb]uild*/ 42 | 43 | .vs/ 44 | .vscode/ 45 | -------------------------------------------------------------------------------- /deps/lz4/INSTALL: -------------------------------------------------------------------------------- 1 | Installation 2 | ============= 3 | 4 | ``` 5 | make 6 | make install # this command may require root access 7 | ``` 8 | 9 | LZ4's `Makefile` supports standard [Makefile conventions], 10 | including [staged installs], [redirection], or [command redefinition]. 11 | It is compatible with parallel builds (`-j#`). 12 | 13 | [Makefile conventions]: https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html 14 | [staged installs]: https://www.gnu.org/prep/standards/html_node/DESTDIR.html 15 | [redirection]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html 16 | [command redefinition]: https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html 17 | -------------------------------------------------------------------------------- /deps/lame/ACM/tinyxml/makedistlinux: -------------------------------------------------------------------------------- 1 | echo "Making version: " 2 | echo $1 3 | echo $2 4 | echo $3 5 | 6 | rm ./docs/* 7 | 8 | doxygen dox 9 | rm -rf ./tinyxml/* 10 | 11 | rm tinyxml_$1_$2_$3.zip 12 | rm tinyxml_$1_$2_$3.tar.gz 13 | 14 | rmdir tinyxml 15 | mkdir tinyxml 16 | 17 | cp readme.txt ./tinyxml 18 | cp changes.txt ./tinyxml 19 | cp Makefile ./tinyxml 20 | 21 | cp tinyxml.cpp tinyxml 22 | cp tinyxmlerror.cpp tinyxml 23 | cp tinyxmlparser.cpp tinyxml 24 | cp xmltest.cpp tinyxml 25 | 26 | cp tinyxml.h tinyxml 27 | cp tinyxml.dsp tinyxml 28 | 29 | mkdir ./tinyxml/docs 30 | cp ./docs/* ./tinyxml/docs 31 | 32 | tar -zcf tinyxml_$1_$2_$3.tar.gz tinyxml 33 | zip -r -q -9 tinyxml_$1_$2_$3.zip tinyxml 34 | 35 | -------------------------------------------------------------------------------- /deps/lame/macosx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | LAME 9 | CFBundleIdentifier 10 | net.sourceforge.LAMEframework 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | LAMh 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /deps/lz4/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /deps/lz4/.circleci/images/primary/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM circleci/buildpack-deps:bionic 2 | 3 | RUN sudo apt-get -y -qq update 4 | RUN sudo apt-get -y install software-properties-common 5 | RUN sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 6 | RUN sudo apt-get -y install cmake 7 | RUN sudo apt-get -y install qemu-system-ppc qemu-user-static qemu-system-arm 8 | RUN sudo apt-get -y install libc6-dev-armel-cross libc6-dev-arm64-cross libc6-dev-i386 9 | RUN sudo apt-get -y install clang clang-tools 10 | RUN sudo apt-get -y install gcc-5 gcc-5-multilib gcc-6 11 | RUN sudo apt-get -y install valgrind 12 | RUN sudo apt-get -y install gcc-multilib-powerpc-linux-gnu gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu 13 | -------------------------------------------------------------------------------- /deps/lz4/contrib/debian/control: -------------------------------------------------------------------------------- 1 | Source: liblz4 2 | Section: devel 3 | Priority: optional 4 | Maintainer: Evgeniy Polyakov 5 | Build-Depends: 6 | cmake (>= 2.6), 7 | debhelper (>= 7.0.50~), 8 | cdbs 9 | Standards-Version: 3.8.0 10 | Homepage: http://www.lz4.org/ 11 | Vcs-Git: git://github.com/lz4/lz4.git 12 | Vcs-Browser: https://github.com/lz4/lz4 13 | 14 | Package: liblz4 15 | Architecture: any 16 | Depends: ${shlibs:Depends}, ${misc:Depends} 17 | Description: Extremely Fast Compression algorithm http://www.lz4.org 18 | 19 | Package: liblz4-dev 20 | Architecture: any 21 | Depends: ${shlibs:Depends}, ${misc:Depends} 22 | Description: Extremely Fast Compression algorithm http://www.lz4.org 23 | Development files. 24 | -------------------------------------------------------------------------------- /deps/lame/mac/LAME_Carbon_Debug.pch: -------------------------------------------------------------------------------- 1 | /* LAME Carbon Debug.pch Precompiled header sources for Carbon debug build of LAME on Macintosh */ #pragma precompile_target "LAME Carbon Debug Headers" #define TARGET_API_MAC_CARBON 1 #include "Precompile_Common.h" #define LAME_LIBRARY_BUILD 1 // Building library #undef LIBSNDFILE // Build with LIBSNDFILE #define NOANALYSIS 1 // Build without frame-analyzer hooks #undef HAVE_MPGLIB // Build without MPGLIB decoder (forces GPL) #undef USE_LAYER_1 // Build without layer-1 decoding (needs MPGLIB) #undef USE_LAYER_2 // Build without layer-2 decoding (needs MPGLIB) #undef HAVE_VORBIS // Build without Ogg Vorbis #undef BRHIST // Build without histogram (not CLI encoder) #define NDEBUG 1 // Build debug version -------------------------------------------------------------------------------- /deps/lame/mac/LAME_Classic_Debug.pch: -------------------------------------------------------------------------------- 1 | /* LAME Classic Debug.pch Precompiled header sources for Classic debug build of LAME on Macintosh */ #pragma precompile_target "LAME Classic Debug Headers" #define TARGET_API_MAC_OS8 1 #include "Precompile_Common.h" #define LAME_LIBRARY_BUILD 1 // Building library #undef LIBSNDFILE // Build with LIBSNDFILE #define NOANALYSIS 1 // Build without frame-analyzer hooks #undef HAVE_MPGLIB // Build without MPGLIB decoder (forces GPL) #undef USE_LAYER_1 // Build without layer-1 decoding (needs MPGLIB) #undef USE_LAYER_2 // Build without layer-2 decoding (needs MPGLIB) #undef HAVE_VORBIS // Build without Ogg Vorbis #undef BRHIST // Build without histogram (not CLI encoder) #define NDEBUG 1 // Build debug version -------------------------------------------------------------------------------- /deps/lame/libmp3lame/lameerror.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A collection of LAME Error Codes 3 | * 4 | * Please use the constants defined here instead of some arbitrary 5 | * values. Currently the values starting at -10 to avoid intersection 6 | * with the -1, -2, -3 and -4 used in the current code. 7 | * 8 | * May be this should be a part of the include/lame.h. 9 | */ 10 | 11 | typedef enum { 12 | LAME_OKAY = 0, 13 | LAME_NOERROR = 0, 14 | LAME_GENERICERROR = -1, 15 | LAME_NOMEM = -10, 16 | LAME_BADBITRATE = -11, 17 | LAME_BADSAMPFREQ = -12, 18 | LAME_INTERNALERROR = -13, 19 | 20 | FRONTEND_READERROR = -80, 21 | FRONTEND_WRITEERROR = -81, 22 | FRONTEND_FILETOOLARGE = -82, 23 | 24 | } lame_errorcodes_t; 25 | 26 | /* end of lameerror.h */ 27 | -------------------------------------------------------------------------------- /src/wasm/binding.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" int transcode_aac(const char* input, const char* output, int64_t bit_rate); 5 | // extern "C" int transcoding(const char* input, const char* output, int64_t bit_rate); 6 | 7 | int js_transcode_aac(const std::string& input, const std::string& output, int bit_rate) { 8 | return transcode_aac(input.c_str(), output.c_str(), bit_rate); 9 | } 10 | 11 | // int js_transcoding(const std::string& input, const std::string& output, int bit_rate) { 12 | // return transcoding(input.c_str(), output.c_str(), bit_rate); 13 | // } 14 | 15 | EMSCRIPTEN_BINDINGS(audio) { 16 | emscripten::function("transcodeAac", js_transcode_aac); 17 | // emscripten::function("transcoding", js_transcoding); 18 | } 19 | -------------------------------------------------------------------------------- /deps/lame/mac/LAME_Carbon_Final.pch: -------------------------------------------------------------------------------- 1 | /* LAME Carbon Debug.pch Precompiled header sources for Carbon non-debug build of LAME on Macintosh */ #pragma precompile_target "LAME Carbon Final Headers" #define TARGET_API_MAC_CARBON 1 #include "Precompile_Common.h" #define LAME_LIBRARY_BUILD 1 // Building library #undef LIBSNDFILE // Build with LIBSNDFILE #define NOANALYSIS 1 // Build without frame-analyzer hooks #undef HAVE_MPGLIB // Build without MPGLIB decoder (forces GPL) #undef USE_LAYER_1 // Build without layer-1 decoding (needs MPGLIB) #undef USE_LAYER_2 // Build without layer-2 decoding (needs MPGLIB) #undef HAVE_VORBIS // Build without Ogg Vorbis #undef BRHIST // Build without histogram (not CLI encoder) #undef NDEBUG // Build final (non-debug) version -------------------------------------------------------------------------------- /deps/lame/mac/LAME_Classic_Final.pch: -------------------------------------------------------------------------------- 1 | /* LAME Classic Final.pch Precompiled header sources for Classic non-debug build of LAME on Macintosh */ #pragma precompile_target "LAME Classic Final Headers" #define TARGET_API_MAC_OS8 1 #include "Precompile_Common.h" #define LAME_LIBRARY_BUILD 1 // Building library #undef LIBSNDFILE // Build with LIBSNDFILE #define NOANALYSIS 1 // Build without frame-analyzer hooks #undef HAVE_MPGLIB // Build without MPGLIB decoder (forces GPL) #undef USE_LAYER_1 // Build without layer-1 decoding (needs MPGLIB) #undef USE_LAYER_2 // Build without layer-2 decoding (needs MPGLIB) #undef HAVE_VORBIS // Build without Ogg Vorbis #undef BRHIST // Build without histogram (not CLI encoder) #undef NDEBUG // Build final (non-debug) version -------------------------------------------------------------------------------- /deps/lame/frontend/parse.h: -------------------------------------------------------------------------------- 1 | #ifndef PARSE_H_INCLUDED 2 | #define PARSE_H_INCLUDED 3 | 4 | #if defined(__cplusplus) 5 | extern "C" { 6 | #endif 7 | 8 | int usage(FILE * const fp, const char *ProgramName); 9 | int short_help(const lame_global_flags * gfp, FILE * const fp, const char *ProgramName); 10 | int long_help(const lame_global_flags * gfp, FILE * const fp, const char *ProgramName, 11 | int lessmode); 12 | int display_bitrates(FILE * const fp); 13 | 14 | int parse_args(lame_global_flags * gfp, int argc, char **argv, char *const inPath, 15 | char *const outPath, char **nogap_inPath, int *max_nogap); 16 | 17 | void parse_close(); 18 | 19 | #if defined(__cplusplus) 20 | } 21 | #endif 22 | 23 | #endif 24 | /* end of parse.h */ 25 | -------------------------------------------------------------------------------- /deps/lame/ACM/tinyxml/tinyxmlerror.cpp: -------------------------------------------------------------------------------- 1 | #include "tinyxml.h" 2 | 3 | // The goal of the seperate error file is to make the first 4 | // step towards localization. tinyxml (currently) only supports 5 | // latin-1, but at least the error messages could now be translated. 6 | // 7 | // It also cleans up the code a bit. 8 | // 9 | 10 | const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] = 11 | { 12 | "No error", 13 | "Error", 14 | "Failed to open file", 15 | "Memory allocation failed.", 16 | "Error parsing Element.", 17 | "Failed to read Element name", 18 | "Error reading Element value.", 19 | "Error reading Attributes.", 20 | "Error: empty tag.", 21 | "Error reading end tag.", 22 | "Error parsing Unknown.", 23 | "Error parsing Comment.", 24 | "Error parsing Declaration.", 25 | "Error document empty." 26 | }; 27 | -------------------------------------------------------------------------------- /common.gypi: -------------------------------------------------------------------------------- 1 | { 2 | 'cflags!': ['-fno-exceptions'], 3 | 'cflags_cc!': ['-fno-exceptions'], 4 | 'include_dirs': [ 5 | " 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ############################################################################# 9 | 10 | # This is a dummy meson file. 11 | # The intention is that it can be easily moved to the root of the project 12 | # (together with meson_options.txt) and packaged for wrapdb. 13 | 14 | project('lz4', ['c'], 15 | license: ['BSD', 'GPLv2'], 16 | default_options : ['c_std=c99', 17 | 'buildtype=release'], 18 | version: 'DUMMY', 19 | meson_version: '>=0.47.0') 20 | 21 | subdir('meson') 22 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/travisoss.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | # Clone the oss-fuzz repository 6 | git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz 7 | 8 | if [[ ! -d /tmp/ossfuzz/projects/lz4 ]] 9 | then 10 | echo "Could not find the lz4 project in ossfuzz" 11 | exit 1 12 | fi 13 | 14 | # Modify the oss-fuzz Dockerfile so that we're checking out the current branch on travis. 15 | if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ] 16 | then 17 | sed -i "s@https://github.com/lz4/lz4.git@-b ${TRAVIS_BRANCH} https://github.com/lz4/lz4.git@" /tmp/ossfuzz/projects/lz4/Dockerfile 18 | else 19 | sed -i "s@https://github.com/lz4/lz4.git@-b ${TRAVIS_PULL_REQUEST_BRANCH} https://github.com/${TRAVIS_PULL_REQUEST_SLUG}.git@" /tmp/ossfuzz/projects/lz4/Dockerfile 20 | fi 21 | 22 | # Try and build the fuzzers 23 | pushd /tmp/ossfuzz 24 | python infra/helper.py build_image --pull lz4 25 | python infra/helper.py build_fuzzers lz4 26 | popd 27 | -------------------------------------------------------------------------------- /lib/movie.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | /** @type {import('fs')} */ 3 | const fs = process.versions.electron ? require('original-fs') : require('fs') 4 | /** @type {typeof import('usm-decrypter').USMDecrypter} */ 5 | let USMDecrypter = null 6 | try { 7 | USMDecrypter = require('usm-decrypter').USMDecrypter 8 | } catch (_) {} 9 | 10 | function demuxAsync (usmFile, outdir) { 11 | return new Promise((resolve, reject) => { 12 | if (!USMDecrypter) return reject(new Error('failed to load usm.node.')) 13 | outdir = outdir || path.join(path.dirname(usmFile), path.parse(usmFile).name + '.demux') 14 | fs.mkdirSync(outdir, { recursive: true }) 15 | const usm = new USMDecrypter() 16 | usm.demux(usmFile, outdir, function (err, p) { 17 | if (err) { 18 | reject(err) 19 | fs.rmdirSync(outdir) 20 | return 21 | } 22 | resolve(p) 23 | }) 24 | }) 25 | } 26 | 27 | exports.demuxAsync = demuxAsync 28 | -------------------------------------------------------------------------------- /deps/lame/Dll/BladeMP3EncDLL.def: -------------------------------------------------------------------------------- 1 | LIBRARY lame_enc.DLL 2 | EXPORTS 3 | 4 | beInitStream @1 5 | beEncodeChunk @2 6 | beDeinitStream @3 7 | beCloseStream @4 8 | beVersion @5 9 | beWriteVBRHeader @6 10 | beEncodeChunkFloatS16NI @7 11 | beFlushNoGap @8 12 | beWriteInfoTag @9 13 | 14 | lame_init @100 15 | lame_close @101 16 | lame_init_params @102 17 | lame_encode_buffer_interleaved @110 18 | lame_encode_flush @120 19 | lame_mp3_tags_fid @130 20 | 21 | 22 | lame_set_num_samples @1000 23 | lame_get_num_samples @1001 24 | lame_set_in_samplerate @1002 25 | lame_get_in_samplerate @1003 26 | lame_set_num_channels @1004 27 | lame_get_num_channels @1005 28 | lame_set_scale @1006 29 | lame_get_scale @1007 30 | lame_set_scale_left @1008 31 | lame_get_scale_left @1009 32 | lame_set_scale_right @1010 33 | lame_get_scale_right @1011 34 | lame_set_out_samplerate @1012 35 | lame_get_out_samplerate @1013 36 | 37 | -------------------------------------------------------------------------------- /deps/lame/misc/auenc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # auenc -- version 0.1 4 | # 5 | # A wrapper for lame to encode multiple files. By default, a .wav 6 | # extension is removed and replaced by .mp3 . 7 | # 8 | # (C) 1999 Gerhard Wesp under the GPL. 9 | 10 | # set the variables below according to your taste 11 | LAME=lame 12 | LAME_OPTS="-S -h -v -V 0 -b 256" # high quality, silent operation 13 | 14 | if [ $# -lt 1 ] ; then 15 | exec 1>&2 16 | cat << _EOF_ 17 | usage: $0 [options] file... 18 | options: 19 | -d --delete: delete original file after successful encoding 20 | _EOF_ 21 | exit 1 22 | fi 23 | 24 | unset DELETE 25 | case "$1" in 26 | -d | --delete ) DELETE=1 ; shift ;; 27 | esac 28 | 29 | for f 30 | do 31 | $LAME $LAME_OPTS "$f" `basename "$f" .wav`.mp3 || { 32 | exec 1>&2 33 | echo "encoding of $f failed, aborting..." 34 | exit 1 35 | } 36 | if [ -n "$DELETE" ] ; then 37 | rm -f "$f" 38 | fi 39 | done 40 | -------------------------------------------------------------------------------- /deps/lz4/programs/lz4-exe.rc.in: -------------------------------------------------------------------------------- 1 | 1 VERSIONINFO 2 | FILEVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0 3 | PRODUCTVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0 4 | FILEFLAGSMASK 0 5 | FILEOS 0x40000 6 | FILETYPE 1 7 | { 8 | BLOCK "StringFileInfo" 9 | { 10 | BLOCK "040904B0" 11 | { 12 | VALUE "CompanyName", "Yann Collet" 13 | VALUE "FileDescription", "Extremely fast compression" 14 | VALUE "FileVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0" 15 | VALUE "InternalName", "@PROGNAME@" 16 | VALUE "LegalCopyright", "Copyright (C) 2013-2016, Yann Collet" 17 | VALUE "OriginalFilename", "@PROGNAME@.@EXT@" 18 | VALUE "ProductName", "LZ4" 19 | VALUE "ProductVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0" 20 | } 21 | } 22 | BLOCK "VarFileInfo" 23 | { 24 | VALUE "Translation", 0x0409, 1200 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /deps/lame/ACM/readme.txt: -------------------------------------------------------------------------------- 1 | In order to build this codec, you need the Windows98 DDK from Microsoft. It can also work 2 | with the Windows2000/ME/XP/2003 DDK: 3 | 4 | http://www.microsoft.com/ddk/ 5 | 6 | Alternatively, the required headers are also available in CYGWIN+w32api, MINGW32 or Wine : 7 | 8 | http://www.cygwin.com/ 9 | http://www.mingw.org/ 10 | http://www.winehq.com/ 11 | 12 | 13 | If you do not have a ddk, you should be able to use the alternative msacmdrv.h provided 14 | with this ACM codec. It is not used by default because it would probably broke any real 15 | DDK already installed. 16 | 17 | 18 | 19 | --------------- 20 | 21 | Define ENABLE_DECODING if you want to use the decoding (alpha state, doesn't decode at the 22 | moment, so use it only if you plan to develop) 23 | 24 | --------------- 25 | 26 | To release this codec you will need : 27 | - lameACM.acm (result of the build process) 28 | - lameACM.inf 29 | - lame_acm.xml (where the initial configuration is stored) 30 | -------------------------------------------------------------------------------- /deps/lame/frontend/gtkanal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This library is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU Library General Public 5 | * License as published by the Free Software Foundation; either 6 | * version 2 of the License, or (at your option) any later version. 7 | * 8 | * This library is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * Library General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Library General Public 14 | * License along with this library; if not, write to the 15 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 | * Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef LAME_GTKCONTROL_H 20 | #define LAME_GTKCONTROL_H 21 | 22 | 23 | int gtkcontrol(lame_global_flags * gfp2, char *inPath); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/README.md: -------------------------------------------------------------------------------- 1 | Meson build system for lz4 2 | ========================== 3 | 4 | Meson is a build system designed to optimize programmer productivity. 5 | It aims to do this by providing simple, out-of-the-box support for 6 | modern software development tools and practices, such as unit tests, 7 | coverage reports, Valgrind, CCache and the like. 8 | 9 | This Meson build system is provided with no guarantee. 10 | 11 | ## How to build 12 | 13 | `cd` to this meson directory (`contrib/meson`) 14 | 15 | ```sh 16 | meson setup --buildtype=release -Ddefault_library=shared -Dbin_programs=true builddir 17 | cd builddir 18 | ninja # to build 19 | ninja install # to install 20 | ``` 21 | 22 | You might want to install it in staging directory: 23 | 24 | ```sh 25 | DESTDIR=./staging ninja install 26 | ``` 27 | 28 | To configure build options, use: 29 | 30 | ```sh 31 | meson configure 32 | ``` 33 | 34 | See [man meson(1)](https://manpages.debian.org/testing/meson/meson.1.en.html). 35 | -------------------------------------------------------------------------------- /binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "module_name": "core", 4 | "module_path": "./dist" 5 | }, 6 | 'targets': [ 7 | { 8 | 'target_name': '<(module_name)', 9 | 'sources': [ 10 | 'src/index.cpp', 11 | 'src/LameAsyncWorker.cpp', 12 | 'src/EncodeWorker.cpp', 13 | 'src/lz4dec.c', 14 | ], 15 | 'includes': [ 16 | './common.gypi' 17 | ], 18 | 'defines': [ 19 | "NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED", 20 | ], 21 | 'dependencies': [ 22 | 'deps/lame/libmp3lame.gyp:mp3lame', 23 | 'deps/lz4/lz4.gyp:lz4', 24 | 'deps/fdk-aac/fdk-aac.gyp:fdk-aac' 25 | ], 26 | }, 27 | { 28 | "target_name": "action_after_build", 29 | "type": "none", 30 | "dependencies": [ "<(module_name)" ], 31 | "copies": [ 32 | { 33 | "files": [ "<(PRODUCT_DIR)/<(module_name).node" ], 34 | "destination": "<(module_path)" 35 | } 36 | ] 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /deps/lame/mpglib/README: -------------------------------------------------------------------------------- 1 | hip - Hip Isn't a Player 2 | A LGPLed mpeg audio decoding library. 3 | 4 | Based off of Michael Hipp's mpglib 0.2a , with many 5 | improvements by the lame development team (see AUTHORS). 6 | 7 | The interface to the library is based off of vorbisfile. If you add mp3 8 | support to your app using this library it should be a snap to add Ogg Vorbis 9 | support as well. 10 | 11 | This isn't as fast as mpg123 will be for decoding as none of it is in 12 | assmbler. 13 | 14 | Seeking currently isn't implemented. 15 | 16 | 17 | From mpglib's orginal README: 18 | ============================= 19 | 20 | PLEASE NOTE: This software may contain patented algorithms (at least 21 | patented in some countries). It may be not allowed to sell/use products 22 | based on this source code in these countries. Check this out first! 23 | 24 | COPYRIGHT of MP3 music: 25 | Please note, that the duplicating of copyrighted music without explicit 26 | permission violates the rights of the owner. 27 | -------------------------------------------------------------------------------- /deps/lame/vc_solution/vc9_lame_config.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 9 | 13 | 23 | 30 | 31 | -------------------------------------------------------------------------------- /deps/lame/ACM/lameACM.def: -------------------------------------------------------------------------------- 1 | ; Lame ACM wrapper, encode/decode MP3 based RIFF/AVI files in MS Windows 2 | ; 3 | ; Copyright (c) 2002 Steve Lhomme 4 | ; 5 | ; This library is free software; you can redistribute it and/or 6 | ; modify it under the terms of the GNU Lesser General Public 7 | ; License as published by the Free Software Foundation; either 8 | ; version 2.1 of the License, or (at your option) any later version. 9 | ; 10 | ; This library is distributed in the hope that it will be useful, 11 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ; Lesser General Public License for more details. 14 | ; 15 | ; You should have received a copy of the GNU Lesser General Public 16 | ; License along with this library; if not, write to the Free Software 17 | ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | LIBRARY lameACM 20 | 21 | DESCRIPTION 'lameACM.acm: MP3 Lame ACM Codec' 22 | 23 | EXPORTS DriverProc 24 | 25 | ; EOF 26 | -------------------------------------------------------------------------------- /deps/lz4/tests/test_install.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env sh 2 | set -e 3 | 4 | 5 | make="make -C $lz4_root" 6 | unamestr=$(uname) 7 | if [ "$unamestr" = 'Linux' ]; then 8 | make="make -C $lz4_root" 9 | elif [ "$unamestr" = 'FreeBSD' -o "$unamestr" = 'OpenBSD' ]; then 10 | make="gmake -C $lz4_root" 11 | fi 12 | 13 | for cmd in install uninstall; do 14 | for upper in DUMMY PREFIX EXEC_PREFIX LIBDIR INCLUDEDIR PKGCONFIGDIR BINDIR MANDIR MAN1DIR ; do 15 | lower=$(echo $upper | tr '[:upper:]' '[:lower:]') 16 | tmp_lower="$(pwd)/tmp-lower-$lower/" 17 | tmp_upper="$(pwd)/tmp-upper-$lower/" 18 | echo $make $cmd DESTDIR="$tmp_upper" $upper="test" 19 | $make $cmd DESTDIR="$tmp_upper" $upper="test" >/dev/null 20 | echo $make $cmd DESTDIR="$tmp_lower" $lower="test" 21 | $make $cmd DESTDIR="$tmp_lower" $lower="test" >/dev/null 22 | command diff -r "$tmp_lower" "$tmp_upper" && echo "SAME!" || false 23 | if [ "x$cmd" = "xuninstall" ]; then 24 | test -z "$(find "$tmp_lower" -type f)" && echo "EMPTY!" || false 25 | rm -rf "$tmp_upper" "$tmp_lower" 26 | fi 27 | done 28 | done 29 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/newmdct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * New Modified DCT include file 3 | * 4 | * Copyright (c) 1999 Takehiro TOMINAGA 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_NEWMDCT_H 23 | #define LAME_NEWMDCT_H 24 | 25 | void mdct_sub48(lame_internal_flags * gfc, const sample_t * w0, const sample_t * w1); 26 | 27 | #endif /* LAME_NEWMDCT_H */ 28 | -------------------------------------------------------------------------------- /deps/lame/dshow/Mpegac.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; LAME MP3 encoder for DirectShow 3 | ; 4 | ; Copyright (c) 2000-2005 Marie Orlova, Peter Gubanov, Vitaly Ivanov, Elecard Ltd. 5 | ; 6 | ; This library is free software; you can redistribute it and/or 7 | ; modify it under the terms of the GNU Library General Public 8 | ; License as published by the Free Software Foundation; either 9 | ; version 2 of the License, or (at your option) any later version. 10 | ; 11 | ; This library is distributed in the hope that it will be useful, 12 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ; Library General Public License for more details. 15 | ; 16 | ; You should have received a copy of the GNU Library General Public 17 | ; License along with this library; if not, write to the 18 | ; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | ; Boston, MA 02111-1307, USA. 20 | ; 21 | 22 | LIBRARY lame.ax 23 | EXPORTS 24 | DllGetClassObject PRIVATE 25 | DllCanUnloadNow PRIVATE 26 | DllRegisterServer PRIVATE 27 | DllUnregisterServer PRIVATE 28 | -------------------------------------------------------------------------------- /deps/lame/DEFINES: -------------------------------------------------------------------------------- 1 | $Id: DEFINES,v 1.23 2003/02/07 18:17:41 bouvigne Exp $ 2 | 3 | USE_FAST_LOG: 4 | - use of log/log10 approximation (uses IEEE754 float format) 5 | (absolute precision of log10 is then around 1e-6) 6 | 7 | KLEMM_36: 8 | - portability fixes in the IO code 9 | 10 | NON_LINEAR_PSYMODEL 11 | - use a non linear psymodel in the GPSYCHO case 12 | 13 | USE_GOGO_SUBBAND: 14 | ? 15 | 16 | NOTABLES (default): 17 | ? 18 | 19 | NEWS3: 20 | ? 21 | 22 | NORES_TEST (allways on): 23 | - don't let the 2nd granule use bits saved by the 1st granule 24 | - useful for testing only 25 | 26 | NEW_DRAIN (theres a define above: NEW_DRAINXX): 27 | ? 28 | comment: 29 | mdb_bytes = x/8; m ?= n ?= o ?= 8* mdb_bytes; p ?= mdb_bytes 30 | ( ? == [+-] ) 31 | - optimization should handle this, but it looks ugly 32 | - do we lose precision here? 33 | 34 | LAME_STD_PRINT: 35 | - more verbose output? 36 | 37 | PRECOMPUTE (always on, multiple defines): 38 | - precomputes blackman window? 39 | 40 | USE_GNUC_ASM: 41 | - speed optimization 42 | (should move into configure.in) 43 | 44 | ... alot of #if 0 / #if 1 not evaluated ... 45 | 46 | -------------------------------------------------------------------------------- /deps/lame/mpglib/dct64_i386.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef MPGLIB_DCT64_I386_H_INCLUDED 23 | #define MPGLIB_DCT64_I386_H_INCLUDED 24 | 25 | #include "common.h" 26 | 27 | void dct64(real * a, real * b, real * c); 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | 3 | Copyright (c) 2018 Toyobayashi 4 | 5 | Permission is hereby granted, free of charge, to any 6 | person obtaining a copy of this software and associated 7 | documentation files (the "Software"), to deal in the 8 | Software without restriction, including without limitation 9 | the rights to use, copy, modify, merge, publish, distribute, 10 | and/or sublicense copies of the Software, and to permit 11 | persons to whom the Software is furnished to do so, subject 12 | to the following conditions: 13 | 14 | 1. The above copyright notice and this permission notice shall 15 | be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /deps/lame/libmp3lame/vector/lame_intrin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lame_intrin.h include file 3 | * 4 | * Copyright (c) 2006 Gabriel Bouvigne 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | 23 | #ifndef LAME_INTRIN_H 24 | #define LAME_INTRIN_H 25 | 26 | 27 | void 28 | init_xrpow_core_sse(gr_info * const cod_info, FLOAT xrpow[576], int upper, FLOAT * sum); 29 | 30 | void 31 | fht_SSE2(FLOAT* , int); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/vbrquantize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MP3 VBR quantization 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_VBRQUANTIZE_H 23 | #define LAME_VBRQUANTIZE_H 24 | 25 | int VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], 26 | const FLOAT l3_xmin[2][2][SFBMAX], const int maxbits[2][2]); 27 | 28 | #endif /* LAME_VBRQUANTIZE_H */ 29 | -------------------------------------------------------------------------------- /deps/lame/mpglib/tabinit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef MPGLIB_TABINIT_H_INCLUDED 23 | #define MPGLIB_TABINIT_H_INCLUDED 24 | 25 | #include "mpg123.h" 26 | 27 | extern real decwin[512 + 32]; 28 | extern real *pnts[5]; 29 | 30 | void make_decode_tables(long scale); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /deps/lz4/contrib/djgpp/README.MD: -------------------------------------------------------------------------------- 1 | # lz4 for DOS/djgpp 2 | This file details on how to compile lz4.exe, and liblz4.a for use on DOS/djgpp using 3 | Andrew Wu's build-djgpp cross compilers ([GH][0], [Binaries][1]) on OSX, Linux. 4 | 5 | ## Setup 6 | * Download a djgpp tarball [binaries][1] for your platform. 7 | * Extract and install it (`tar jxvf djgpp-linux64-gcc492.tar.bz2`). Note the path. We'll assume `/home/user/djgpp`. 8 | * Add the `bin` folder to your `PATH`. In bash, do `export PATH=/home/user/djgpp/bin:$PATH`. 9 | * The `Makefile` in `contrib/djgpp/` sets up `CC`, `AR`, `LD` for you. So, `CC=i586-pc-msdosdjgpp-gcc`, `AR=i586-pc-msdosdjgpp-ar`, `LD=i586-pc-msdosdjgpp-gcc`. 10 | 11 | ## Building LZ4 for DOS 12 | In the base dir of lz4 and with `contrib/djgpp/Makefile`, try: 13 | Try: 14 | * `make -f contrib/djgpp/Makefile` 15 | * `make -f contrib/djgpp/Makefile liblz4.a` 16 | * `make -f contrib/djgpp/Makefile lz4.exe` 17 | * `make -f contrib/djgpp/Makefile DESTDIR=/home/user/dos install`, however it doesn't make much sense on a \*nix. 18 | * You can also do `make -f contrib/djgpp/Makefile uninstall` 19 | 20 | [0]: https://github.com/andrewwutw/build-djgpp 21 | [1]: https://github.com/andrewwutw/build-djgpp/releases 22 | -------------------------------------------------------------------------------- /deps/lame/mpglib/layer1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAYER1_H_INCLUDED 23 | #define LAYER1_H_INCLUDED 24 | 25 | void hip_init_tables_layer1(void); 26 | int decode_layer1_sideinfo(PMPSTR mp); 27 | int decode_layer1_frame(PMPSTR mp, unsigned char *pcm_sample, int *pcm_point); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /lib/config.js: -------------------------------------------------------------------------------- 1 | const core = require('./core.js') 2 | 3 | class Config { 4 | constructor () { 5 | this._callbackInterval = 100 6 | this._aacBitRate = 160 7 | } 8 | 9 | getCallbackInterval () { 10 | return this._callbackInterval 11 | } 12 | 13 | setCallbackInterval (num) { 14 | if (typeof num !== 'number') throw new TypeError(`setCallbackInterval(): The argument must be a number, but got {${typeof num}}.`) 15 | this._callbackInterval = num 16 | } 17 | 18 | getProgressCallback () { 19 | checkNativeModule() 20 | return core.getProgressCallback() 21 | } 22 | 23 | setProgressCallback (value) { 24 | checkNativeModule() 25 | if (typeof value !== 'boolean') throw new TypeError(`setProgressCallback(): The argument must be a boolean, but got {${typeof value}}.`) 26 | core.setProgressCallback(value) 27 | } 28 | 29 | list () { 30 | const res = { 31 | callbackInterval: this._callbackInterval 32 | } 33 | if (core) { 34 | res.progressCallback = core.getProgressCallback() 35 | } 36 | return res 37 | } 38 | } 39 | 40 | module.exports = new Config() 41 | 42 | function checkNativeModule () { 43 | if (!core) throw new Error('failed to load core.node.') 44 | } 45 | -------------------------------------------------------------------------------- /cgen.config.js: -------------------------------------------------------------------------------- 1 | const cgen = require('@tybys/cgen') 2 | 3 | module.exports = cgen.defineFunctionConfig(function (_options, { isDebug }) { 4 | const debugFlags = [ 5 | '-sDISABLE_EXCEPTION_CATCHING=0', 6 | '-sSAFE_HEAP=1' 7 | ] 8 | 9 | const commonFlags = [ 10 | '--bind', 11 | // '-sINITIAL_MEMORY=33554432', 12 | '-sALLOW_MEMORY_GROWTH=1', 13 | ...(isDebug ? debugFlags : []) 14 | ] 15 | 16 | return { 17 | project: 'audio', 18 | targets: [ 19 | { 20 | name: 'audio', 21 | type: 'exe', 22 | sources: [ 23 | './src/wasm/transcode_aac.c', 24 | // './src/wasm/transcoding.c', 25 | './src/wasm/binding.cpp' 26 | ], 27 | libs: [ // $EMSDK/upstream/emscripten/system/local/lib 28 | 'avcodec', 29 | 'avformat', 30 | 'avutil', 31 | 'swresample', 32 | 'mp3lame'/* , 33 | 'avfilter', 34 | 'swscale' */ 35 | ], 36 | emwrap: { 37 | wrapScript: './src/wasm/wrap.js', 38 | exportsOnInit: ['FS', 'NODEFS'] 39 | }, 40 | compileOptions: [...commonFlags], 41 | linkOptions: [...commonFlags, '-lnodefs.js'] 42 | } 43 | ] 44 | } 45 | }) 46 | -------------------------------------------------------------------------------- /deps/lz4/contrib/snap/snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: lz4 2 | version: 1.8.4 3 | summary: Extremely Fast Compression algorithm 4 | description: > 5 | LZ4 is lossless compression algorithm, providing compression 6 | speed > 500 MB/s per core, scalable with multi-cores CPU. It features an 7 | extremely fast decoder, with speed in multiple GB/s per core, typically 8 | reaching RAM speed limits on multi-core systems. 9 | . 10 | Speed can be tuned dynamically, selecting an "acceleration" factor which 11 | trades compression ratio for faster speed. On the other end, a high 12 | compression derivative, LZ4_HC, is also provided, trading CPU time for 13 | improved compression ratio. All versions feature the same decompression 14 | speed. 15 | . 16 | LZ4 is also compatible with dictionary compression, and can ingest any 17 | input file as dictionary, including those created by Zstandard Dictionary 18 | Builder. (note: only the final 64KB are used). 19 | . 20 | LZ4 library is provided as open-source software using BSD 2-Clause license. 21 | confinement: strict 22 | grade: stable 23 | 24 | apps: 25 | lz4: 26 | command: usr/local/bin/lz4 27 | plugs: [home] 28 | parts: 29 | lz4: 30 | source: ../ 31 | plugin: make 32 | -------------------------------------------------------------------------------- /script/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | @REM call npm.cmd install -g node-gyp@9 4 | 5 | @REM for /f "delims=" %%P in ('npm prefix -g') do call npm.cmd config set node_gyp "%%P\node_modules\node-gyp\bin\node-gyp.js" 6 | 7 | @REM call node-gyp.cmd install 8 | 9 | call npm.cmd install 10 | 11 | @REM powershell.exe -nologo -noprofile -command "& { $client=new-object System.Net.WebClient; $client.DownloadFile('https://github.com/toyobayashi/wasm-ffmpeg/releases/download/n4.4-1/ffmpeg-wasm-n4.4-1.zip', 'ffmpeg-wasm.n4.4-1.zip'); }" 12 | @REM powershell.exe -nologo -noprofile -command "& { param([String]$sourceArchiveFileName, [String]$destinationDirectoryName); Add-Type -A 'System.IO.Compression.FileSystem'; Add-Type -A 'System.Text.Encoding'; [IO.Compression.ZipFile]::ExtractToDirectory($sourceArchiveFileName, $destinationDirectoryName, [System.Text.Encoding]::UTF8); exit !$?; }" -sourceArchiveFileName "ffmpeg-wasm.n4.4-1.zip" -destinationDirectoryName ".local" 13 | @REM xcopy .local "%EMSDK%\upstream\emscripten\system\local" /Y /E 14 | 15 | @REM call npm.cmd run build:wasm 16 | @REM if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% 17 | 18 | @REM if not exist dist mkdir dist 19 | @REM copy /Y .cgenbuild\Release\audio.js dist\ 20 | @REM copy /Y .cgenbuild\Release\audio.wasm dist\ 21 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/vector/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.1 2007/01/09 10:15:53 aleidinger Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | if WITH_XMM 6 | noinst_LTLIBRARIES = liblamevectorroutines.la 7 | endif 8 | 9 | ##liblamecpuroutines_la_LIBADD = 10 | ##liblamecpuroutines_la_LDFLAGS = 11 | 12 | INCLUDES = @INCLUDES@ \ 13 | -I$(top_srcdir)/libmp3lame \ 14 | -I$(top_srcdir)/mpglib \ 15 | -I$(top_builddir) 16 | 17 | DEFS = @DEFS@ @CONFIG_DEFS@ 18 | 19 | xmm_sources = xmm_quantize_sub.c 20 | 21 | if WITH_XMM 22 | liblamevectorroutines_la_SOURCES = $(xmm_sources) 23 | endif 24 | 25 | noinst_HEADERS = lame_intrin.h 26 | 27 | EXTRA_liblamevectorroutines_la_SOURCES = $(xmm_sources) 28 | 29 | CLEANFILES = lclint.txt 30 | 31 | LCLINTFLAGS= \ 32 | +posixlib \ 33 | +showsummary \ 34 | +showalluses \ 35 | +whichlib \ 36 | +forcehints \ 37 | -fixedformalarray \ 38 | +matchanyintegral \ 39 | -Dlint 40 | 41 | lclint.txt: ${liblamecpuroutines_la_SOURCES} ${noinst_HEADERS} 42 | @lclint ${LCLINTFLAGS} ${INCLUDES} ${DEFS} ${liblamecpuroutines_la_SOURCES} 2>&1 >lclint.txt || true 43 | 44 | lclint: lclint.txt 45 | more lclint.txt 46 | 47 | #$(OBJECTS): libtool 48 | #libtool: $(LIBTOOL_DEPS) 49 | # $(SHELL) $(top_builddir)/config.status --recheck 50 | -------------------------------------------------------------------------------- /deps/lame/mpglib/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.18 2010/10/30 13:21:02 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | INCLUDES = @INCLUDES@ -I$(top_srcdir)/libmp3lame -I$(top_builddir) 6 | 7 | EXTRA_DIST = \ 8 | AUTHORS \ 9 | README 10 | 11 | DEFS = @DEFS@ @CONFIG_DEFS@ 12 | 13 | noinst_LTLIBRARIES = libmpgdecoder.la 14 | 15 | libmpgdecoder_la_SOURCES = common.c \ 16 | dct64_i386.c \ 17 | decode_i386.c \ 18 | interface.c \ 19 | layer1.c \ 20 | layer2.c \ 21 | layer3.c \ 22 | tabinit.c 23 | 24 | noinst_HEADERS = common.h \ 25 | dct64_i386.h \ 26 | decode_i386.h \ 27 | huffman.h \ 28 | interface.h \ 29 | l2tables.h \ 30 | layer1.h \ 31 | layer2.h \ 32 | layer3.h \ 33 | mpg123.h \ 34 | mpglib.h \ 35 | tabinit.h 36 | 37 | LCLINTFLAGS= \ 38 | +posixlib \ 39 | +showsummary \ 40 | +showalluses \ 41 | +whichlib \ 42 | +forcehints \ 43 | -fixedformalarray \ 44 | +matchanyintegral \ 45 | -Dlint 46 | 47 | lclint.txt: ${libmpgdecoder_la_SOURCES} ${noinst_HEADERS} 48 | @lclint ${LCLINTFLAGS} ${INCLUDES} ${DEFS} ${libmpgdecoder_la_SOURCES} 2>&1 >lclint.txt || true 49 | 50 | lclint: lclint.txt 51 | more lclint.txt 52 | 53 | #$(OBJECTS): libtool 54 | #libtool: $(LIBTOOL_DEPS) 55 | # $(SHELL) $(top_builddir)/config.status --recheck 56 | -------------------------------------------------------------------------------- /deps/lz4/lib/liblz4-dll.rc.in: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // DLL version information. 4 | 1 VERSIONINFO 5 | FILEVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0 6 | PRODUCTVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | #ifdef _DEBUG 9 | FILEFLAGS VS_FF_DEBUG | VS_FF_PRERELEASE 10 | #else 11 | FILEFLAGS 0 12 | #endif 13 | FILEOS VOS_NT_WINDOWS32 14 | FILETYPE VFT_DLL 15 | FILESUBTYPE VFT2_UNKNOWN 16 | BEGIN 17 | BLOCK "StringFileInfo" 18 | BEGIN 19 | BLOCK "040904B0" 20 | BEGIN 21 | VALUE "CompanyName", "Yann Collet" 22 | VALUE "FileDescription", "Extremely fast compression" 23 | VALUE "FileVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0" 24 | VALUE "InternalName", "@LIBLZ4@" 25 | VALUE "LegalCopyright", "Copyright (C) 2013-2016, Yann Collet" 26 | VALUE "OriginalFilename", "@LIBLZ4@.dll" 27 | VALUE "ProductName", "LZ4" 28 | VALUE "ProductVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0" 29 | END 30 | END 31 | BLOCK "VarFileInfo" 32 | BEGIN 33 | VALUE "Translation", 0x0409, 1200 34 | END 35 | END 36 | -------------------------------------------------------------------------------- /src/wav.h: -------------------------------------------------------------------------------- 1 | #ifndef __WAV_H__ 2 | #define __WAV_H__ 3 | 4 | #include 5 | 6 | typedef struct WAV_RIFF { 7 | /* chunk "riff" */ 8 | char ChunkID[4]; /* "RIFF" */ 9 | /* sub-chunk-size */ 10 | uint32_t ChunkSize; /* 36 + Subchunk2Size */ 11 | /* sub-chunk-data */ 12 | char Format[4]; /* "WAVE" */ 13 | } RIFF_t; 14 | 15 | typedef struct WAV_FMT { 16 | /* sub-chunk "fmt" */ 17 | char Subchunk1ID[4]; /* "fmt " */ 18 | /* sub-chunk-size */ 19 | uint32_t Subchunk1Size; /* 16 for PCM */ 20 | /* sub-chunk-data */ 21 | uint16_t AudioFormat; /* PCM = 1*/ 22 | uint16_t NumChannels; /* Mono = 1, Stereo = 2, etc. */ 23 | uint32_t SampleRate; /* 8000, 44100, etc. */ 24 | uint32_t ByteRate; /* = SampleRate * NumChannels * BitsPerSample/8 */ 25 | uint16_t BlockAlign; /* = NumChannels * BitsPerSample/8 */ 26 | uint16_t BitsPerSample; /* 8bits, 16bits, etc. */ 27 | } FMT_t; 28 | 29 | typedef struct WAV_data { 30 | /* sub-chunk "data" */ 31 | char Subchunk2ID[4]; /* "data" */ 32 | /* sub-chunk-size */ 33 | uint32_t Subchunk2Size; /* data size */ 34 | /* sub-chunk-data */ 35 | } Data_t; 36 | 37 | typedef struct WAV_fotmat { 38 | RIFF_t riff; 39 | FMT_t fmt; 40 | Data_t data; 41 | } Wav; 42 | 43 | #endif // ! __WAV_H__ 44 | -------------------------------------------------------------------------------- /deps/fdk-aac/configure.ac: -------------------------------------------------------------------------------- 1 | dnl -*- Autoconf -*- 2 | dnl Process this file with autoconf to produce a configure script. 3 | 4 | AC_INIT([fdk-aac], [2.0.2], [http://sourceforge.net/projects/opencore-amr/]) 5 | AC_CONFIG_AUX_DIR(.) 6 | AC_CONFIG_MACRO_DIR([m4]) 7 | AM_INIT_AUTOMAKE([tar-ustar foreign]) 8 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 9 | 10 | dnl Various options for configure 11 | AC_ARG_ENABLE([example], 12 | [AS_HELP_STRING([--enable-example], 13 | [enable example encoding program (default is no)])], 14 | [example=$enableval], [example=no]) 15 | 16 | dnl Automake conditionals to set 17 | AM_CONDITIONAL(EXAMPLE, test x$example = xyes) 18 | 19 | dnl Checks for programs. 20 | AC_PROG_CC 21 | AC_PROG_CXX 22 | LT_INIT 23 | 24 | AC_SEARCH_LIBS([sin], [m]) 25 | 26 | dnl soname version to use 27 | dnl goes by ‘current[:revision[:age]]’ with the soname ending up as 28 | dnl current.age.revision 29 | FDK_AAC_VERSION=2:2:0 30 | 31 | AS_IF([test x$enable_shared = xyes], [LIBS_PRIVATE=$LIBS], [LIBS_PUBLIC=$LIBS]) 32 | AC_SUBST(FDK_AAC_VERSION) 33 | AC_SUBST(LIBS_PUBLIC) 34 | AC_SUBST(LIBS_PRIVATE) 35 | 36 | AC_CONFIG_FILES([Makefile 37 | fdk-aac.pc]) 38 | AC_OUTPUT 39 | -------------------------------------------------------------------------------- /deps/lame/lame.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem --------------------------------------------- 3 | rem PURPOSE: 4 | rem - put this Batch-Command on your Desktop, 5 | rem so you can drag and drop wave files on it 6 | rem and LAME will encode them to mp3 format. 7 | rem - put this Batch-Command in a place mentioned 8 | rem in your PATH environment, start the DOS-BOX 9 | rem and change to a directory where your wave 10 | rem files are located. the following line will 11 | rem encode all your wave files to mp3 12 | rem "lame.bat *.wav" 13 | rem --------------------------------------------- 14 | rem C2000 Robert Hegemann 15 | rem --------------------------------------------- 16 | rem please set LAME and LAMEOPTS 17 | rem LAME - where the executeable is 18 | rem OPTS - options you like LAME to use 19 | 20 | set LAME=lame.exe 21 | set OPTS=--preset cd 22 | 23 | rem --------------------------------------------- 24 | 25 | set thecmd=%LAME% %OPTS% 26 | lfnfor on 27 | :processArgs 28 | if "%1"=="" goto endmark 29 | for %%f in (%1) do %thecmd% "%%f" 30 | if errorlevel 1 goto errormark 31 | shift 32 | goto processArgs 33 | :errormark 34 | echo. 35 | echo. 36 | echo ERROR processing %1 37 | echo. 38 | :endmark 39 | rem 40 | rem finished 41 | rem 42 | -------------------------------------------------------------------------------- /deps/lz4/contrib/gen_manual/README.md: -------------------------------------------------------------------------------- 1 | gen_manual - a program for automatic generation of manual from source code 2 | ========================================================================== 3 | 4 | #### Introduction 5 | 6 | This simple C++ program generates a single-page HTML manual from `lz4.h`. 7 | 8 | The format of recognized comment blocks is following: 9 | - comments of type `/*!` mean: this is a function declaration; switch comments with declarations 10 | - comments of type `/**` and `/*-` mean: this is a comment; use a `

` header for the first line 11 | - comments of type `/*=` and `/**=` mean: use a `

` header and show also all functions until first empty line 12 | - comments of type `/*X` where `X` is different from above-mentioned are ignored 13 | 14 | Moreover: 15 | - `LZ4LIB_API` is removed to improve readability 16 | - `typedef` are detected and included even if uncommented 17 | - comments of type `/**<` and `/*!<` are detected and only function declaration is highlighted (bold) 18 | 19 | 20 | #### Usage 21 | 22 | The program requires 3 parameters: 23 | ``` 24 | gen_manual [lz4_version] [input_file] [output_html] 25 | ``` 26 | 27 | To compile program and generate lz4 manual we have used: 28 | ``` 29 | make 30 | ./gen_manual.exe 1.7.3 ../../lib/lz4.h lz4_manual.html 31 | ``` 32 | -------------------------------------------------------------------------------- /deps/fdk-aac/wavreader.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------ 2 | * Copyright (C) 2009 Martin Storsjo 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. 14 | * See the License for the specific language governing permissions 15 | * and limitations under the License. 16 | * ------------------------------------------------------------------- 17 | */ 18 | 19 | #ifndef WAVREADER_H 20 | #define WAVREADER_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | void* wav_read_open(const char *filename); 27 | void wav_read_close(void* obj); 28 | 29 | int wav_get_header(void* obj, int* format, int* channels, int* sample_rate, int* bits_per_sample, unsigned int* data_length); 30 | int wav_read_data(void* obj, unsigned char* data, unsigned int length); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/meson_options.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################# 2 | # Copyright (c) 2018-present lzutao 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ############################################################################# 9 | 10 | # Read guidelines from https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting 11 | 12 | option('debug_level', type: 'integer', min: 0, max: 7, value: 1, 13 | description: 'Enable run-time debug. See lib/lz4hc.c') 14 | option('backtrace', type: 'boolean', value: false, 15 | description: 'Display a stack backtrace when execution generates a runtime exception') 16 | 17 | option('bin_programs', type: 'boolean', value: false, 18 | description: 'Enable programs build') 19 | option('bin_tests', type: 'boolean', value: false, 20 | description: 'Enable tests build') 21 | option('bin_contrib', type: 'boolean', value: false, 22 | description: 'Enable contrib build') 23 | option('bin_examples', type: 'boolean', value: false, 24 | description: 'Enable examples build') 25 | -------------------------------------------------------------------------------- /deps/lz4/contrib/snap/README.md: -------------------------------------------------------------------------------- 1 | Snap Packaging 2 | -------------- 3 | 4 | This directory contains the config required to generate a snap package 5 | of lz4. Snaps are universal Linux packages that allow you to easily 6 | build your application from any source and ship it to any Linux 7 | distribution by publishing it to https://snapcraft.io/. A key attribute 8 | of a snap package is that it is (ideally) confined such that it 9 | executes within a controlled environmenti with all its dependencies 10 | bundled with it and does not share dependencies with of from any other 11 | package on the system (with a couple of minor exceptions). 12 | 13 | The basic anatomy and workflow is: 14 | 15 | * ensure snap.snapcraft.yaml is up-to-date e.g. with version info 16 | 17 | * build the snap by installing the snapcraft package and running it 18 | 19 | * push snap/* changes to the repo (excluding any crud generated by a build of course) 20 | 21 | * register yourself as owner of lz4 name in snapstore 22 | 23 | * publish new snap to the snap store 24 | 25 | * install snap by doing 'snap install lz4' on any Linux distro 26 | 27 | * all installed copies of lz4 will be automatically updated to your new version 28 | 29 | For more information on Snaps see https://docs.snapcraft.io and https://forum.snapcraft.io/ 30 | -------------------------------------------------------------------------------- /src/LameAsyncWorker.h: -------------------------------------------------------------------------------- 1 | #ifndef __LAME_ASYNC_WORKER_H__ 2 | #define __LAME_ASYNC_WORKER_H__ 3 | 4 | #include 5 | #include 6 | 7 | #include "EncodeData.h" 8 | 9 | class LameAsyncWorker : public Napi::AsyncProgressQueueWorker { 10 | public: 11 | LameAsyncWorker(const std::string& wavPath, 12 | const std::string& mp3Path, 13 | int bitRate, 14 | int sampleRate, 15 | int channels, 16 | const Napi::Function& callback); 17 | LameAsyncWorker(const std::string& wavPath, 18 | const std::string& mp3Path, 19 | int bitRate, 20 | int sampleRate, 21 | int channels, 22 | const Napi::Function& callback, 23 | const Napi::Function& onProgress); 24 | void Execute(const ExecutionProgress& progress); 25 | void OnOK(); 26 | void OnError(const Napi::Error&); 27 | void OnProgress(const EncodeData* data, size_t count); 28 | 29 | private: 30 | int _bitRate; // 16 24 32 40 48 56 64 80 96 112 128 160 192 224 256 320 31 | int _sampleRate; 32 | int _channels; 33 | std::string _wavPath; 34 | std::string _mp3Path; 35 | Napi::FunctionReference onProgress; 36 | }; 37 | 38 | #endif // ! __LAME_ASYNC_WORKER_H__ 39 | -------------------------------------------------------------------------------- /deps/lame/mpglib/layer2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | 23 | #ifndef LAYER2_H_INCLUDED 24 | #define LAYER2_H_INCLUDED 25 | 26 | 27 | struct al_table2 { 28 | short bits; 29 | short d; 30 | }; 31 | 32 | 33 | 34 | void hip_init_tables_layer2(void); 35 | int decode_layer2_sideinfo(PMPSTR mp); 36 | int decode_layer2_frame(PMPSTR mp, unsigned char *pcm_sample, int *pcm_point); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /deps/lame/vc_solution/vc9_nasm.rules: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 16 | 17 | 23 | 29 | 36 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /deps/lame/frontend/lametime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Lame time routines include file 3 | * 4 | * Copyright (c) 2000 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_LAMETIME_H 23 | #define LAME_LAMETIME_H 24 | 25 | #include 26 | #include "lame.h" 27 | 28 | #if defined(__cplusplus) 29 | extern "C" { 30 | #endif 31 | 32 | extern double GetCPUTime(void); 33 | extern double GetRealTime(void); 34 | 35 | extern int lame_set_stream_binary_mode(FILE * const fp); 36 | 37 | #if defined(__cplusplus) 38 | } 39 | #endif 40 | 41 | #endif /* LAME_LAMETIME_H */ 42 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/reservoir.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bit reservoir include file 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_RESERVOIR_H 23 | #define LAME_RESERVOIR_H 24 | 25 | int ResvFrameBegin(lame_internal_flags * gfc, int *mean_bits); 26 | void ResvMaxBits(lame_internal_flags * gfc, int mean_bits, int *targ_bits, int *max_bits, 27 | int cbr); 28 | void ResvAdjust(lame_internal_flags * gfc, gr_info const *gi); 29 | void ResvFrameEnd(lame_internal_flags * gfc, int mean_bits); 30 | 31 | #endif /* LAME_RESERVOIR_H */ 32 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/fft.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fast Fourier Transform include file 3 | * 4 | * Copyright (c) 2000 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_FFT_H 23 | #define LAME_FFT_H 24 | 25 | void fft_long(lame_internal_flags const *const gfc, FLOAT x_real[BLKSIZE], 26 | int chn, const sample_t *const data[2]); 27 | 28 | void fft_short(lame_internal_flags const *const gfc, FLOAT x_real[3][BLKSIZE_s], 29 | int chn, const sample_t *const data[2]); 30 | 31 | void init_fft(lame_internal_flags * const gfc); 32 | 33 | #endif 34 | 35 | /* End of fft.h */ 36 | -------------------------------------------------------------------------------- /deps/lz4/lib/dll/example/fullbench-dll.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Express 2012 for Windows Desktop 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench-dll", "fullbench-dll.vcxproj", "{13992FD2-077E-4954-B065-A428198201A9}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Debug|x64 = Debug|x64 9 | Release|Win32 = Release|Win32 10 | Release|x64 = Release|x64 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.ActiveCfg = Debug|Win32 14 | {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.Build.0 = Debug|Win32 15 | {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.ActiveCfg = Debug|x64 16 | {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.Build.0 = Debug|x64 17 | {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.ActiveCfg = Release|Win32 18 | {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.Build.0 = Release|Win32 19 | {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.ActiveCfg = Release|x64 20 | {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.Build.0 = Release|x64 21 | EndGlobalSection 22 | GlobalSection(SolutionProperties) = preSolution 23 | HideSolutionNode = FALSE 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /deps/lame/frontend/brhist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitrate histogram include file 3 | * 4 | * Copyright (c) 2000 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_BRHIST_H 23 | #define LAME_BRHIST_H 24 | 25 | #include "lame.h" 26 | 27 | #if defined(__cplusplus) 28 | extern "C" { 29 | #endif 30 | 31 | int brhist_init(const lame_global_flags * gf, const int bitrate_kbps_min, 32 | const int bitrate_kbps_max); 33 | void brhist_disp(const lame_global_flags * gf); 34 | void brhist_jump_back(void); 35 | 36 | #if defined(__cplusplus) 37 | } 38 | #endif 39 | 40 | #endif /* LAME_BRHIST_H */ 41 | -------------------------------------------------------------------------------- /deps/lz4/contrib/djgpp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, lpsantil 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /deps/lz4/lib/LICENSE: -------------------------------------------------------------------------------- 1 | LZ4 Library 2 | Copyright (c) 2011-2016, Yann Collet 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | list of conditions and the following disclaimer in the documentation and/or 13 | other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 22 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /deps/lame/ACM/adebug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Lame ACM wrapper, encode/decode MP3 based RIFF/AVI files in MS Windows 4 | * 5 | * Copyright (c) 2002 Steve Lhomme 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | * 21 | */ 22 | 23 | /*! 24 | \author Steve Lhomme 25 | \version \$Id: adebug.h,v 1.2 2002/01/22 19:45:02 robux4 Exp $ 26 | */ 27 | 28 | #if !defined(_DEBUG_H__INCLUDED_) 29 | #define _DEBUG_H__INCLUDED_ 30 | 31 | #define DEBUG_LEVEL_CREATION 0 32 | 33 | #define DEBUG_LEVEL_MSG 0 34 | #define DEBUG_LEVEL_FUNC_START 1 35 | #define DEBUG_LEVEL_FUNC_DEBUG 2 36 | #define DEBUG_LEVEL_FUNC_CODE 3 37 | 38 | #endif /* !defined(_DEBUG_H__INCLUDED_) */ 39 | 40 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/lame.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "version.h" 3 | 4 | #ifdef _DLL 5 | IDI_ICON1 ICON DISCARDABLE "logoe.ico" 6 | #else 7 | IDI_ICON1 ICON DISCARDABLE "logoe.ico" 8 | #endif 9 | 10 | VS_VERSION_INFO VERSIONINFO 11 | FILEVERSION LAME_MAJOR_VERSION,LAME_MINOR_VERSION,LAME_TYPE_VERSION,LAME_PATCH_VERSION 12 | PRODUCTVERSION LAME_MAJOR_VERSION,LAME_MINOR_VERSION,LAME_TYPE_VERSION,LAME_PATCH_VERSION 13 | FILEFLAGSMASK 0x3fL 14 | #ifdef _DEBUG 15 | FILEFLAGS VS_FF_DEBUG 16 | #else 17 | FILEFLAGS 0x0L 18 | #endif 19 | FILEOS VOS__WINDOWS32 20 | #ifdef _DLL 21 | FILETYPE VFT_DLL 22 | #else 23 | FILETYPE VFT_APP 24 | #endif 25 | FILESUBTYPE 0x0L 26 | BEGIN 27 | BLOCK "StringFileInfo" 28 | BEGIN 29 | BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual 30 | BEGIN 31 | VALUE "CompanyName", LAME_URL "\0" 32 | VALUE "FileDescription", "MP3 Encoder.\0" 33 | VALUE "FileVersion", LAME_VERSION_STRING "\0" 34 | VALUE "LegalCopyright", "Copyright (C) 1999-2011 The L.A.M.E. Team\0" 35 | #ifdef _DLL 36 | VALUE "OriginalFilename", STR(_DLL) "\0" 37 | #else 38 | VALUE "OriginalFilename", STR(_APP) "\0" 39 | #endif 40 | VALUE "ProductName", "L.A.M.E.\0" 41 | VALUE "ProductVersion", LAME_VERSION_STRING "\0" 42 | END 43 | END 44 | BLOCK "VarFileInfo" 45 | BEGIN 46 | VALUE "Translation", 0x409, 1252 // mandatory by convention 47 | END 48 | END 49 | /* End of Version info */ 50 | 51 | -------------------------------------------------------------------------------- /deps/lame/mpglib/layer3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAYER3_H_INCLUDED 23 | #define LAYER3_H_INCLUDED 24 | 25 | void hip_init_tables_layer3(void); 26 | int decode_layer3_sideinfo(PMPSTR mp); 27 | int decode_layer3_frame(PMPSTR mp, unsigned char *pcm_sample, int *pcm_point, 28 | int (*synth_1to1_mono_ptr) (PMPSTR, real *, unsigned char *, int *), 29 | int (*synth_1to1_ptr) (PMPSTR, real *, int, unsigned char *, int *)); 30 | int layer3_audiodata_precedesframes(PMPSTR mp); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /deps/lz4/lz4.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'variables': { 'target_arch%': 'ia32' }, # default for node v0.6.x 3 | 4 | 'target_defaults': { 5 | 'default_configuration': 'Debug', 6 | 'configurations': { 7 | 'Debug': { 8 | 'defines': [ 'DEBUG', '_DEBUG' ], 9 | 'msvs_settings': { 10 | 'VCCLCompilerTool': { 11 | 'RuntimeLibrary': 1, # static debug 12 | }, 13 | }, 14 | }, 15 | 'Release': { 16 | 'defines': [ 'NDEBUG' ], 17 | 'msvs_settings': { 18 | 'VCCLCompilerTool': { 19 | 'RuntimeLibrary': 0, # static release 20 | }, 21 | }, 22 | } 23 | }, 24 | 'msvs_settings': { 25 | 'VCLinkerTool': { 26 | 'GenerateDebugInformation': 'true', 27 | }, 28 | }, 29 | 30 | 'defines': [ 31 | ], 32 | 'include_dirs': [ 33 | 'lib', 34 | ], 35 | 'conditions': [ 36 | ['OS=="win"', { 37 | 'defines': [ 38 | ] 39 | }] 40 | ], 41 | }, 42 | 43 | 'targets': [ 44 | 45 | # libmp3lame 46 | { 47 | 'target_name': 'lz4', 48 | 'product_prefix': 'lib', 49 | 'type': 'static_library', 50 | 'sources': [ 51 | 'lib/lz4.c', 52 | 'lib/lz4frame.c', 53 | 'lib/lz4hc.c', 54 | 'lib/xxhash.c', 55 | ], 56 | 'direct_dependent_settings': { 57 | 'include_dirs': [ 58 | 'lib', 59 | ], 60 | }, 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mishiro-core", 3 | "version": "6.3.7", 4 | "description": "CGSS JavaScript library in Node.js", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "node-gyp rebuild", 8 | "build:wasm": "cgen rebuild -e", 9 | "test": "mocha", 10 | "test-audio": "mocha ./test/audio.test.js", 11 | "test-check": "mocha ./test/check.test.js", 12 | "test-download": "mocha ./test/download.test.js", 13 | "before-deploy": "node ./script/before-deploy.js" 14 | }, 15 | "keywords": [ 16 | "cgss", 17 | "deresute", 18 | "mishiro" 19 | ], 20 | "author": "toyobayashi", 21 | "repository": { 22 | "type": "git", 23 | "url": "git+https://github.com/toyobayashi/mishiro-core.git" 24 | }, 25 | "publishConfig": { 26 | "access": "public" 27 | }, 28 | "license": "MIT", 29 | "devDependencies": { 30 | "eslint": "^7.24.0", 31 | "eslint-config-standard": "^16.0.2", 32 | "eslint-plugin-import": "^2.22.1", 33 | "eslint-plugin-node": "^11.1.0", 34 | "eslint-plugin-promise": "^5.1.0", 35 | "fs-extra": "^9.1.0", 36 | "mocha": "^6.1.4", 37 | "typescript": "~4.1.5" 38 | }, 39 | "dependencies": { 40 | "@tybys/downloader": "^0.2.0", 41 | "acb": "2.1.0", 42 | "got": "^11.8.2", 43 | "hca-decoder": "1.6.0", 44 | "usm-decrypter": "1.1.2", 45 | "jimp": "0.16.1", 46 | "msgpack-lite": "0.1.26", 47 | "node-addon-api": "*", 48 | "proxy-agent": "4.0.1" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /deps/lame/mpglib/decode_i386.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef DECODE_I386_H_INCLUDED 23 | #define DECODE_I386_H_INCLUDED 24 | 25 | #include "common.h" 26 | 27 | int synth_1to1_mono(PMPSTR mp, real * bandPtr, unsigned char *out, int *pnt); 28 | int synth_1to1(PMPSTR mp, real * bandPtr, int channel, unsigned char *out, int *pnt); 29 | 30 | int synth_1to1_mono_unclipped(PMPSTR mp, real * bandPtr, unsigned char *out, int *pnt); 31 | int synth_1to1_unclipped(PMPSTR mp, real * bandPtr, int channel, unsigned char *out, int *pnt); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/fuzz_data_producer.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "fuzz_helpers.h" 7 | #include "lz4frame.h" 8 | #include "lz4hc.h" 9 | 10 | /* Struct used for maintaining the state of the data */ 11 | typedef struct FUZZ_dataProducer_s FUZZ_dataProducer_t; 12 | 13 | /* Returns a data producer state struct. Use for producer initialization. */ 14 | FUZZ_dataProducer_t *FUZZ_dataProducer_create(const uint8_t *data, size_t size); 15 | 16 | /* Frees the data producer */ 17 | void FUZZ_dataProducer_free(FUZZ_dataProducer_t *producer); 18 | 19 | /* Returns 32 bits from the end of data */ 20 | uint32_t FUZZ_dataProducer_retrieve32(FUZZ_dataProducer_t *producer); 21 | 22 | /* Returns value between [min, max] */ 23 | uint32_t FUZZ_getRange_from_uint32(uint32_t seed, uint32_t min, uint32_t max); 24 | 25 | /* Combination of above two functions for non adaptive use cases. ie where size is not involved */ 26 | uint32_t FUZZ_dataProducer_range32(FUZZ_dataProducer_t *producer, uint32_t min, 27 | uint32_t max); 28 | 29 | /* Returns lz4 preferences */ 30 | LZ4F_preferences_t FUZZ_dataProducer_preferences(FUZZ_dataProducer_t* producer); 31 | 32 | /* Returns lz4 frame info */ 33 | LZ4F_frameInfo_t FUZZ_dataProducer_frameInfo(FUZZ_dataProducer_t* producer); 34 | 35 | /* Returns the size of the remaining bytes of data in the producer */ 36 | size_t FUZZ_dataProducer_remainingBytes(FUZZ_dataProducer_t *producer); 37 | -------------------------------------------------------------------------------- /deps/lame/Dll/Makefile.mingw32: -------------------------------------------------------------------------------- 1 | # This makefile compiles lame_enc.dll with mingw32 (and possibly cygwin) 2 | # Of course, you must first build ../libmp3lame/libmp3lame.a. 3 | # liblame_enc.a can be used to link the lame_enc.dll to your programs. 4 | # Tested with EAC 0.9pb9 (my own favorite, http://www.exactaudiocopy.de/) 5 | # example.exe compiles and works, too. 6 | # Vladislav Naumov, 7 | # 8 | # PS: to 'make clean' you need rm. MS's del is unusable. 9 | # PPS: quick build: 10 | # make -fMakefile.mingw32 11 | 12 | DLL_NAME = lame_enc 13 | LAME_SRC_ROOT = .. 14 | OFILES = BladeMP3EncDLL.o $(DLL_NAME)_exp.o 15 | CFLAGS = -I$(LAME_SRC_ROOT)/include -I$(LAME_SRC_ROOT)/libmp3lame 16 | CC = g++ 17 | LD = g++ 18 | LFLAGS = -L$(LAME_SRC_ROOT)/libmp3lame -o $(DLL_NAME).dll -mdll -s 19 | LIBS = -lmp3lame 20 | 21 | all: $(DLL_NAME).dll example.exe 22 | 23 | BladeMP3EncDLL.o: BladeMP3EncDLL.c BladeMP3EncDLL.h ../include/lame.h \ 24 | ../libmp3lame/lame_global_flags.h ../libmp3lame/version.h 25 | 26 | $(DLL_NAME).dll : $(OFILES) 27 | $(LD) $(LFLAGS) $(OFILES) $(LIBS) 28 | 29 | $(DLL_NAME)_exp.o : BladeMP3EncDLL.o 30 | dlltool --input-def BladeMP3EncDLL.def --output-lib lib$(DLL_NAME).a --output-exp $(DLL_NAME)_exp.o --dllname $(DLL_NAME) BladeMP3EncDLL.o 31 | 32 | %.o : %.c 33 | $(CC) $(CFLAGS) -c $< -o $@ 34 | 35 | example.exe : Example.cpp BladeMP3EncDLL.h 36 | $(CC) Example.cpp -o example.exe 37 | 38 | clean : 39 | rm -f $(DLL_NAME).dll $(OFILES) example.exe 40 | -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/meson/GetLz4LibraryVersion.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # ############################################################################# 3 | # Copyright (c) 2018-present lzutao 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under both the BSD-style license (found in the 7 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 8 | # in the COPYING file in the root directory of this source tree). 9 | # ############################################################################# 10 | import re 11 | 12 | 13 | def find_version_tuple(filepath): 14 | version_file_data = None 15 | with open(filepath) as fd: 16 | version_file_data = fd.read() 17 | 18 | patterns = r"""#\s*define\s+LZ4_VERSION_MAJOR\s+([0-9]+).*$ 19 | #\s*define\s+LZ4_VERSION_MINOR\s+([0-9]+).*$ 20 | #\s*define\s+LZ4_VERSION_RELEASE\s+([0-9]+).*$ 21 | """ 22 | regex = re.compile(patterns, re.MULTILINE) 23 | version_match = regex.search(version_file_data) 24 | if version_match: 25 | return version_match.groups() 26 | raise Exception("Unable to find version string.") 27 | 28 | 29 | def main(): 30 | import argparse 31 | parser = argparse.ArgumentParser(description='Print lz4 version from lib/lz4.h') 32 | parser.add_argument('file', help='path to lib/lz4.h') 33 | args = parser.parse_args() 34 | version_tuple = find_version_tuple(args.file) 35 | print('.'.join(version_tuple)) 36 | 37 | 38 | if __name__ == '__main__': 39 | main() 40 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/round_trip_hc_fuzzer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * This fuzz target performs a lz4 round-trip test (compress & decompress), 3 | * compares the result with the original, and calls abort() on corruption. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "fuzz_helpers.h" 12 | #include "fuzz_data_producer.h" 13 | #include "lz4.h" 14 | #include "lz4hc.h" 15 | 16 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 17 | { 18 | FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size); 19 | int const level = FUZZ_dataProducer_range32(producer, 20 | LZ4HC_CLEVEL_MIN, LZ4HC_CLEVEL_MAX); 21 | size = FUZZ_dataProducer_remainingBytes(producer); 22 | 23 | size_t const dstCapacity = LZ4_compressBound(size); 24 | char* const dst = (char*)malloc(dstCapacity); 25 | char* const rt = (char*)malloc(size); 26 | 27 | FUZZ_ASSERT(dst); 28 | FUZZ_ASSERT(rt); 29 | 30 | /* Compression must succeed and round trip correctly. */ 31 | int const dstSize = LZ4_compress_HC((const char*)data, dst, size, 32 | dstCapacity, level); 33 | FUZZ_ASSERT(dstSize > 0); 34 | 35 | int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); 36 | FUZZ_ASSERT_MSG(rtSize == size, "Incorrect size"); 37 | FUZZ_ASSERT_MSG(!memcmp(data, rt, size), "Corruption!"); 38 | 39 | free(dst); 40 | free(rt); 41 | FUZZ_dataProducer_free(producer); 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /deps/lame/dshow/aboutprp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LAME MP3 encoder for DirectShow 3 | * About property page 4 | * 5 | * Copyright (c) 2000-2005 Marie Orlova, Peter Gubanov, Vitaly Ivanov, Elecard Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | class CMAEAbout: public CBasePropertyPage 24 | { 25 | public: 26 | 27 | CMAEAbout(LPUNKNOWN lpUnk, HRESULT *phr); 28 | static CUnknown * WINAPI CreateInstance(LPUNKNOWN lpunk, HRESULT *phr); 29 | 30 | HRESULT OnActivate(); 31 | HRESULT OnConnect(IUnknown *pUnknown); 32 | HRESULT OnDisconnect(); 33 | HRESULT OnDeactivate(); 34 | HRESULT OnApplyChanges(); 35 | BOOL OnReceiveMessage(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 36 | 37 | private: 38 | void SetDirty(void); 39 | 40 | BOOL m_fWindowInactive; 41 | }; 42 | -------------------------------------------------------------------------------- /deps/lame/misc/lame4dos.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem --------------------------------------------- 3 | rem PURPOSE: 4 | rem - put this Batch-Command on your Desktop, 5 | rem so you can drag and drop wave files on it 6 | rem and LAME will encode them to mp3 format. 7 | rem - put this Batch-Command in a place mentioned 8 | rem in your PATH environment, start the DOS-BOX 9 | rem and change to a directory where your wave 10 | rem files are located. the following line will 11 | rem encode all your wave files to mp3 12 | rem "lame.bat *.wav" 13 | rem --------------------------------------------- 14 | rem C2000 Robert Hegemann 15 | rem --------------------------------------------- 16 | rem Changes to support long filenames using 4DOS 17 | rem by Alexander Stumpf 18 | rem --------------------------------------------- 19 | rem please set LAME and LAMEOPTS 20 | rem LAME - where the executeable is 21 | rem OPTS - options you like LAME to use 22 | 23 | set LAME=c:\progra~1\sound&~1\lame\lame.exe 24 | set OPTS=-h --lowpass-width 2 --lowpass 20.5 -b 112 --abr 180 25 | 26 | rem --------------------------------------------- 27 | 28 | set thecmd=%LAME% %OPTS% 29 | for %%f in (%&) do (%thecmd% %@sfn[%%f]^(ren %@sfn[%%f].mp3 "%@lfn[%%f].mp_">NUL)) 30 | ren *.mp3.mp_ *.new.mp3 >& NUL 31 | ren *.wav.mp_ *.mp3 >& NUL 32 | goto endmark 33 | :errormark 34 | echo. 35 | echo. 36 | echo ERROR processing %1 37 | echo. 38 | :endmark 39 | rem 40 | rem finished 41 | rem 42 | -------------------------------------------------------------------------------- /src/lz4dec.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "lz4.h" 4 | #include "lz4dec.h" 5 | 6 | static uint32_t read_uint32_le(const uint8_t* buf, int offset) { 7 | uint32_t first = *(buf + offset); 8 | uint32_t second = (uint32_t)(*(buf + offset + 1)) << 8; 9 | uint32_t third = (uint32_t)(*(buf + offset + 2)) << 16; 10 | uint32_t fourth = (uint32_t)(*(buf + offset + 3)) << 24; 11 | return first + second + third + fourth; 12 | } 13 | 14 | uint32_t lz4_get_uncompressed_size(const uint8_t* buf, size_t buflen) { 15 | if (buf == NULL || buflen < 16) return 0; 16 | return read_uint32_le(buf, 4); 17 | } 18 | 19 | int lz4_dec_buffer(const uint8_t* buf, size_t buflen, uint8_t* out, size_t outlen) { 20 | uint32_t uncompressed_size = read_uint32_le(buf, 4); 21 | uint32_t compressed_size = read_uint32_le(buf, 8); 22 | 23 | if (uncompressed_size == compressed_size) { 24 | if (outlen < compressed_size) { 25 | size_t bufrest = buflen - 16; 26 | if (bufrest < outlen) { 27 | memcpy(out, buf + 16, bufrest); 28 | return bufrest; 29 | } 30 | memcpy(out, buf + 16, outlen); 31 | return outlen; 32 | } 33 | memcpy(out, buf + 16, compressed_size); 34 | return compressed_size; 35 | } 36 | 37 | char* compressed_data = (char*)malloc(compressed_size); 38 | memcpy(compressed_data, buf + 16, compressed_size); 39 | const int decompressed_size = LZ4_decompress_safe(compressed_data, (char*)out, compressed_size, outlen); 40 | free(compressed_data); 41 | 42 | return decompressed_size; 43 | } 44 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.cjson": "jsonc", 4 | "*.wxss": "css", 5 | "*.wxs": "javascript", 6 | "algorithm": "cpp", 7 | "atomic": "cpp", 8 | "bit": "cpp", 9 | "cctype": "cpp", 10 | "chrono": "cpp", 11 | "clocale": "cpp", 12 | "cmath": "cpp", 13 | "compare": "cpp", 14 | "concepts": "cpp", 15 | "cstddef": "cpp", 16 | "cstdint": "cpp", 17 | "cstdio": "cpp", 18 | "cstdlib": "cpp", 19 | "cstring": "cpp", 20 | "ctime": "cpp", 21 | "cwchar": "cpp", 22 | "exception": "cpp", 23 | "functional": "cpp", 24 | "initializer_list": "cpp", 25 | "ios": "cpp", 26 | "iosfwd": "cpp", 27 | "istream": "cpp", 28 | "iterator": "cpp", 29 | "limits": "cpp", 30 | "list": "cpp", 31 | "memory": "cpp", 32 | "mutex": "cpp", 33 | "new": "cpp", 34 | "ostream": "cpp", 35 | "ratio": "cpp", 36 | "sstream": "cpp", 37 | "stdexcept": "cpp", 38 | "stop_token": "cpp", 39 | "streambuf": "cpp", 40 | "string": "cpp", 41 | "system_error": "cpp", 42 | "thread": "cpp", 43 | "tuple": "cpp", 44 | "type_traits": "cpp", 45 | "typeinfo": "cpp", 46 | "unordered_map": "cpp", 47 | "utility": "cpp", 48 | "vector": "cpp", 49 | "xfacet": "cpp", 50 | "xhash": "cpp", 51 | "xiosbase": "cpp", 52 | "xlocale": "cpp", 53 | "xlocinfo": "cpp", 54 | "xlocnum": "cpp", 55 | "xmemory": "cpp", 56 | "xstddef": "cpp", 57 | "xstring": "cpp", 58 | "xtr1common": "cpp", 59 | "xutility": "cpp" 60 | } 61 | } -------------------------------------------------------------------------------- /deps/lame/misc/lameid3.pl: -------------------------------------------------------------------------------- 1 | # 2 | # From: Per Bolmstedt 3 | # 4 | # AC> If someone has scripts that read input ID3 tags and convert 5 | # AC> them to args for lame (which then encodes the tags into the 6 | # AC> output files), let me know, too! 7 | # 8 | # This is easy peasy using Perl. Especially using Chris Nandor's excellent 9 | # MP3::Info package (available on CPAN). Here's a program I just wrote that 10 | # I think does what you want. Invoke it with " [options]" 11 | # (where the options can include an output filename), like for example: 12 | # 13 | # lameid3.pl HQ.mp3 LQ.mp3 -fv 14 | # 15 | # (Note how the syntax differs from that of Lame's.) The program will 16 | # extract ID3 tags from the input file and invoke Lame with arguments for 17 | # including them. (This program has not undergone any real testing..) 18 | 19 | use MP3::Info; 20 | use strict; 21 | 22 | my %flds = ( 23 | TITLE => 'tt', 24 | ARTIST => 'ta', 25 | ALBUM => 'tl', 26 | YEAR => 'ty', 27 | COMMENT => 'tc', 28 | GENRE => 'tg', 29 | TRACKNUM => 'tn' 30 | ); 31 | 32 | my $f = shift @ARGV; 33 | my $s = "lame ${f} " . &makeid3args( $f ) . join ' ', @ARGV; 34 | print STDERR "[${s}]\n"; 35 | system( $s ); 36 | 37 | sub makeid3args( $ ) 38 | { 39 | my $s; 40 | if ( my $tag = get_mp3tag( @_->[ 0 ] ) ) 41 | { 42 | for ( keys %flds ) 43 | { 44 | if ( $tag->{ $_ } ) 45 | { 46 | $s .= sprintf( 47 | "--%s \"%s\" ", 48 | %flds->{ $_ }, 49 | $tag->{ $_ } ); 50 | } 51 | } 52 | } 53 | return $s || ""; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/round_trip_frame_fuzzer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * This fuzz target performs a lz4 round-trip test (compress & decompress), 3 | * compares the result with the original, and calls abort() on corruption. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "fuzz_helpers.h" 12 | #include "lz4.h" 13 | #include "lz4frame.h" 14 | #include "lz4_helpers.h" 15 | #include "fuzz_data_producer.h" 16 | 17 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 18 | { 19 | FUZZ_dataProducer_t* producer = FUZZ_dataProducer_create(data, size); 20 | LZ4F_preferences_t const prefs = FUZZ_dataProducer_preferences(producer); 21 | size = FUZZ_dataProducer_remainingBytes(producer); 22 | 23 | size_t const dstCapacity = LZ4F_compressFrameBound(LZ4_compressBound(size), &prefs); 24 | char* const dst = (char*)malloc(dstCapacity); 25 | char* const rt = (char*)malloc(FUZZ_dataProducer_remainingBytes(producer)); 26 | 27 | FUZZ_ASSERT(dst); 28 | FUZZ_ASSERT(rt); 29 | 30 | /* Compression must succeed and round trip correctly. */ 31 | size_t const dstSize = 32 | LZ4F_compressFrame(dst, dstCapacity, data, size, &prefs); 33 | FUZZ_ASSERT(!LZ4F_isError(dstSize)); 34 | size_t const rtSize = FUZZ_decompressFrame(rt, size, dst, dstSize); 35 | FUZZ_ASSERT_MSG(rtSize == size, "Incorrect regenerated size"); 36 | FUZZ_ASSERT_MSG(!memcmp(data, rt, size), "Corruption!"); 37 | 38 | free(dst); 39 | free(rt); 40 | FUZZ_dataProducer_free(producer); 41 | 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /deps/lame/frontend/rtp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rtp socket communication include file 3 | * 4 | * initially contributed by Felix von Leitner 5 | * 6 | * Copyright (c) 2000 Mark Taylor 7 | * 2010 Robert Hegemann 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Library General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Library General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Library General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 | * Boston, MA 02111-1307, USA. 23 | */ 24 | 25 | #ifndef LAME_RTP_H 26 | #define LAME_RTP_H 27 | 28 | #if defined(__cplusplus) 29 | extern "C" { 30 | #endif 31 | 32 | struct RtpStruct; 33 | typedef struct RtpStruct *RtpHandle; 34 | 35 | void rtp_initialization(void); 36 | void rtp_deinitialization(void); 37 | int rtp_socket( /*RtpHandle rtp, */ char const *Address, unsigned int port, 38 | unsigned int TTL); 39 | void rtp_output( /*RtpHandle rtp, */ unsigned char const *mp3buffer, int mp3size); 40 | 41 | #if defined(__cplusplus) 42 | } 43 | #endif 44 | #endif 45 | -------------------------------------------------------------------------------- /deps/lz4/build/VS2010/lz4/lz4.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | 4 | #include "lz4.h" /* LZ4_VERSION_STRING */ 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | #include "verrsrc.h" 7 | #undef APSTUDIO_READONLY_SYMBOLS 8 | 9 | 10 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 11 | LANGUAGE 9, 1 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // 15 | // Version 16 | // 17 | 18 | VS_VERSION_INFO VERSIONINFO 19 | FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 20 | PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 21 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 22 | #ifdef _DEBUG 23 | FILEFLAGS VS_FF_DEBUG 24 | #else 25 | FILEFLAGS 0x0L 26 | #endif 27 | FILEOS VOS_NT_WINDOWS32 28 | FILETYPE VFT_DLL 29 | FILESUBTYPE VFT2_UNKNOWN 30 | BEGIN 31 | BLOCK "StringFileInfo" 32 | BEGIN 33 | BLOCK "040904B0" 34 | BEGIN 35 | VALUE "CompanyName", "Yann Collet" 36 | VALUE "FileDescription", "Extremely fast compression" 37 | VALUE "FileVersion", LZ4_VERSION_STRING 38 | VALUE "InternalName", "lz4.exe" 39 | VALUE "LegalCopyright", "Copyright (C) 2013-2016, Yann Collet" 40 | VALUE "OriginalFilename", "lz4.exe" 41 | VALUE "ProductName", "LZ4" 42 | VALUE "ProductVersion", LZ4_VERSION_STRING 43 | END 44 | END 45 | BLOCK "VarFileInfo" 46 | BEGIN 47 | VALUE "Translation", 0x0409, 1200 48 | END 49 | END 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /deps/lz4/build/VS2017/lz4/lz4.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | 4 | #include "lz4.h" /* LZ4_VERSION_STRING */ 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | #include "verrsrc.h" 7 | #undef APSTUDIO_READONLY_SYMBOLS 8 | 9 | 10 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 11 | LANGUAGE 9, 1 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // 15 | // Version 16 | // 17 | 18 | VS_VERSION_INFO VERSIONINFO 19 | FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 20 | PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 21 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 22 | #ifdef _DEBUG 23 | FILEFLAGS VS_FF_DEBUG 24 | #else 25 | FILEFLAGS 0x0L 26 | #endif 27 | FILEOS VOS_NT_WINDOWS32 28 | FILETYPE VFT_DLL 29 | FILESUBTYPE VFT2_UNKNOWN 30 | BEGIN 31 | BLOCK "StringFileInfo" 32 | BEGIN 33 | BLOCK "040904B0" 34 | BEGIN 35 | VALUE "CompanyName", "Yann Collet" 36 | VALUE "FileDescription", "Extremely fast compression" 37 | VALUE "FileVersion", LZ4_VERSION_STRING 38 | VALUE "InternalName", "lz4.exe" 39 | VALUE "LegalCopyright", "Copyright (C) 2013-2016, Yann Collet" 40 | VALUE "OriginalFilename", "lz4.exe" 41 | VALUE "ProductName", "LZ4" 42 | VALUE "ProductVersion", LZ4_VERSION_STRING 43 | END 44 | END 45 | BLOCK "VarFileInfo" 46 | BEGIN 47 | VALUE "Translation", 0x0409, 1200 48 | END 49 | END 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /deps/lz4/build/VS2010/liblz4-dll/liblz4-dll.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | 4 | #include "lz4.h" /* LZ4_VERSION_STRING */ 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | #include "verrsrc.h" 7 | #undef APSTUDIO_READONLY_SYMBOLS 8 | 9 | 10 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 11 | LANGUAGE 9, 1 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // 15 | // Version 16 | // 17 | 18 | VS_VERSION_INFO VERSIONINFO 19 | FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 20 | PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 21 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 22 | #ifdef _DEBUG 23 | FILEFLAGS VS_FF_DEBUG 24 | #else 25 | FILEFLAGS 0x0L 26 | #endif 27 | FILEOS VOS_NT_WINDOWS32 28 | FILETYPE VFT_DLL 29 | FILESUBTYPE VFT2_UNKNOWN 30 | BEGIN 31 | BLOCK "StringFileInfo" 32 | BEGIN 33 | BLOCK "040904B0" 34 | BEGIN 35 | VALUE "CompanyName", "Yann Collet" 36 | VALUE "FileDescription", "Extremely fast compression" 37 | VALUE "FileVersion", LZ4_VERSION_STRING 38 | VALUE "InternalName", "lz4.dll" 39 | VALUE "LegalCopyright", "Copyright (C) 2013-2016, Yann Collet" 40 | VALUE "OriginalFilename", "lz4.dll" 41 | VALUE "ProductName", "LZ4" 42 | VALUE "ProductVersion", LZ4_VERSION_STRING 43 | END 44 | END 45 | BLOCK "VarFileInfo" 46 | BEGIN 47 | VALUE "Translation", 0x0409, 1200 48 | END 49 | END 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /deps/lz4/build/VS2017/liblz4-dll/liblz4-dll.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | 4 | #include "lz4.h" /* LZ4_VERSION_STRING */ 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | #include "verrsrc.h" 7 | #undef APSTUDIO_READONLY_SYMBOLS 8 | 9 | 10 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 11 | LANGUAGE 9, 1 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // 15 | // Version 16 | // 17 | 18 | VS_VERSION_INFO VERSIONINFO 19 | FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 20 | PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 21 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 22 | #ifdef _DEBUG 23 | FILEFLAGS VS_FF_DEBUG 24 | #else 25 | FILEFLAGS 0x0L 26 | #endif 27 | FILEOS VOS_NT_WINDOWS32 28 | FILETYPE VFT_DLL 29 | FILESUBTYPE VFT2_UNKNOWN 30 | BEGIN 31 | BLOCK "StringFileInfo" 32 | BEGIN 33 | BLOCK "040904B0" 34 | BEGIN 35 | VALUE "CompanyName", "Yann Collet" 36 | VALUE "FileDescription", "Extremely fast compression" 37 | VALUE "FileVersion", LZ4_VERSION_STRING 38 | VALUE "InternalName", "lz4.dll" 39 | VALUE "LegalCopyright", "Copyright (C) 2013-2016, Yann Collet" 40 | VALUE "OriginalFilename", "lz4.dll" 41 | VALUE "ProductName", "LZ4" 42 | VALUE "ProductVersion", LZ4_VERSION_STRING 43 | END 44 | END 45 | BLOCK "VarFileInfo" 46 | BEGIN 47 | VALUE "Translation", 0x0409, 1200 48 | END 49 | END 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /deps/lame/frontend/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.35 2011/10/16 13:09:01 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | bin_PROGRAMS = @WITH_FRONTEND@ @WITH_MP3RTP@ @WITH_MP3X@ 6 | EXTRA_PROGRAMS = lame$(EXEEXT) mp3rtp$(EXEEXT) mp3x$(EXEEXT) 7 | 8 | EXTRA_DIST = \ 9 | amiga_mpega.c 10 | 11 | DEFS = @DEFS@ @CONFIG_DEFS@ 12 | 13 | common_sources = \ 14 | main.c \ 15 | brhist.c \ 16 | console.c \ 17 | get_audio.c \ 18 | lametime.c \ 19 | parse.c \ 20 | timestatus.c 21 | 22 | noinst_HEADERS = \ 23 | brhist.h \ 24 | console.h \ 25 | get_audio.h \ 26 | gtkanal.h \ 27 | gpkplotting.h \ 28 | lametime.h \ 29 | main.h \ 30 | parse.h \ 31 | rtp.h \ 32 | timestatus.h 33 | 34 | lame_SOURCES = lame_main.c $(common_sources) 35 | mp3rtp_SOURCES = mp3rtp.c rtp.c $(common_sources) 36 | mp3x_SOURCES = mp3x.c gtkanal.c gpkplotting.c $(common_sources) 37 | 38 | CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ 39 | LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@ 40 | 41 | INCLUDES = -I$(top_srcdir)/libmp3lame -I$(top_srcdir)/include -I$(top_builddir) 42 | 43 | LDADD = @LDADD@ \ 44 | $(top_builddir)/libmp3lame/libmp3lame.la \ 45 | @FRONTEND_LDADD@ 46 | 47 | mp3x_LDADD = $(LDADD) @GTK_LIBS@ 48 | 49 | CLEANFILES = lclint.txt $(EXTRA_PROGRAMS) 50 | 51 | LCLINTFLAGS= \ 52 | +posixlib \ 53 | +showsummary \ 54 | +showalluses \ 55 | +whichlib \ 56 | +forcehints \ 57 | -fixedformalarray \ 58 | +matchanyintegral \ 59 | -Dlint 60 | 61 | lclint.txt: ${lame_SOURCES} ${noinst_HEADERS} 62 | @lclint ${LCLINTFLAGS} ${INCLUDES} ${DEFS} ${lame_SOURCES} 2>&1 >lclint.txt || true 63 | 64 | lclint: lclint.txt 65 | more lclint.txt 66 | -------------------------------------------------------------------------------- /deps/lame/mpglib/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | 23 | #ifndef COMMON_H_INCLUDED 24 | #define COMMON_H_INCLUDED 25 | 26 | #include "mpg123.h" 27 | #include "mpglib.h" 28 | 29 | extern const int tabsel_123[2][3][16]; 30 | extern const long freqs[9]; 31 | 32 | extern real muls[27][64]; 33 | 34 | 35 | int head_check(unsigned long head, int check_layer); 36 | int decode_header(PMPSTR mp, struct frame *fr, unsigned long newhead); 37 | unsigned int getbits(PMPSTR mp, int number_of_bits); 38 | unsigned int getbits_fast(PMPSTR mp, int number_of_bits); 39 | unsigned char get_leq_8_bits(PMPSTR mp, unsigned int number_of_bits); 40 | unsigned short get_leq_16_bits(PMPSTR mp, unsigned int number_of_bits); 41 | int set_pointer(PMPSTR mp, long backstep); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /deps/lz4/programs/bench.h: -------------------------------------------------------------------------------- 1 | /* 2 | bench.h - Demo program to benchmark open-source compression algorithm 3 | Copyright (C) Yann Collet 2012-2016 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | 19 | You can contact the author at : 20 | - LZ4 source repository : https://github.com/lz4/lz4 21 | - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c 22 | */ 23 | #ifndef BENCH_H_125623623633 24 | #define BENCH_H_125623623633 25 | 26 | #include 27 | 28 | int BMK_benchFiles(const char** fileNamesTable, unsigned nbFiles, 29 | int cLevel, int cLevelLast, 30 | const char* dictFileName); 31 | 32 | /* Set Parameters */ 33 | void BMK_setNbSeconds(unsigned nbLoops); 34 | void BMK_setBlockSize(size_t blockSize); 35 | void BMK_setAdditionalParam(int additionalParam); 36 | void BMK_setNotificationLevel(unsigned level); 37 | void BMK_setBenchSeparately(int separate); 38 | 39 | #endif /* BENCH_H_125623623633 */ 40 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/quantize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MP3 quantization 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_QUANTIZE_H 23 | #define LAME_QUANTIZE_H 24 | 25 | void CBR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 26 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 27 | 28 | void VBR_old_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 29 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 30 | 31 | void VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 32 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 33 | 34 | void ABR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 35 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 36 | 37 | 38 | #endif /* LAME_QUANTIZE_H */ 39 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/bitstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MP3 bitstream Output interface for LAME 3 | * 4 | * Copyright (c) 1999 Takehiro TOMINAGA 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_BITSTREAM_H 23 | #define LAME_BITSTREAM_H 24 | 25 | int getframebits(const lame_internal_flags * gfc); 26 | 27 | int format_bitstream(lame_internal_flags * gfc); 28 | 29 | void flush_bitstream(lame_internal_flags * gfc); 30 | void add_dummy_byte(lame_internal_flags * gfc, unsigned char val, unsigned int n); 31 | 32 | int copy_buffer(lame_internal_flags * gfc, unsigned char *buffer, int buffer_size, 33 | int update_crc); 34 | void init_bit_stream_w(lame_internal_flags * gfc); 35 | void CRC_writeheader(lame_internal_flags const *gfc, char *buffer); 36 | int compute_flushbits(const lame_internal_flags * gfp, int *nbytes); 37 | 38 | int get_max_frame_buffer_size_by_constraint(SessionConfig_t const * cfg, int constraint); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/meson/contrib/gen_manual/meson.build: -------------------------------------------------------------------------------- 1 | # ############################################################################# 2 | # Copyright (c) 2018-present lzutao 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ############################################################################# 9 | 10 | lz4_root_dir = '../../../../..' 11 | 12 | add_languages('cpp') 13 | cxx = meson.get_compiler('cpp') 14 | 15 | gen_manual_includes = include_directories(join_paths(lz4_root_dir, 'contrib/gen_manual')) 16 | 17 | gen_manual_cppflags = cxx.get_supported_arguments(['-Wextra', '-Wcast-qual', 18 | '-Wcast-align', '-Wshadow', '-Wstrict-aliasing=1', '-Wswitch-enum', 19 | '-Wno-comment']) 20 | 21 | gen_manual = executable('gen_manual', 22 | join_paths(lz4_root_dir, 'contrib/gen_manual/gen_manual.cpp'), 23 | cpp_args: gen_manual_cppflags, 24 | include_directories: gen_manual_includes, 25 | native: true, 26 | install: false) 27 | 28 | # Update lz4 manual 29 | lz4_manual_html = custom_target('lz4_manual.html', 30 | output : 'lz4_manual.html', 31 | command : [gen_manual, 32 | lz4_version, 33 | join_paths(meson.current_source_dir(), lz4_root_dir, 'lib/lz4.h'), 34 | '@OUTPUT@'], 35 | install : false) 36 | # Update lz4frame manual 37 | lz4_manual_html = custom_target('lz4frame_manual.html', 38 | output : 'lz4frame_manual.html', 39 | command : [gen_manual, 40 | lz4_version, 41 | join_paths(meson.current_source_dir(), lz4_root_dir, 'lib/lz4frame.h'), 42 | '@OUTPUT@'], 43 | install : false) 44 | -------------------------------------------------------------------------------- /deps/lame/ACM/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by acm.rc 4 | // 5 | #define IDI_ICON 101 6 | #define IDD_CONFIG 102 7 | #define IDD_ABOUT 103 8 | #define IDC_STATIC_DECODING 1000 9 | #define IDC_CHECK_COPYRIGHT 1001 10 | #define IDC_CHECK_CHECKSUM 1002 11 | #define IDC_CHECK_ORIGINAL 1003 12 | #define IDC_CHECK_PRIVATE 1004 13 | #define IDC_COMBO_ENC_STEREO 1005 14 | #define IDC_CHECK_ENC_SMART 1006 15 | #define IDC_STATIC_ENC_ICON 1007 16 | #define IDC_STATIC_ABOUT_TITLE 1008 17 | #define IDC_STATIC_ABOUT_URL 1009 18 | #define IDC_STATIC_CONFIG_VERSION 1010 19 | #define IDC_CHECK_ENC_ABR 1011 20 | #define IDC_SLIDER_AVERAGE_MIN 1012 21 | #define IDC_SLIDER_AVERAGE_MAX 1013 22 | #define IDC_SLIDER_AVERAGE_STEP 1014 23 | #define IDC_SLIDER_AVERAGE_SAMPLE 1015 24 | #define IDC_STATIC_AVERAGE_MIN 1016 25 | #define IDC_STATIC_AVERAGE_MAX 1017 26 | #define IDC_STATIC_AVERAGE_STEP 1018 27 | #define IDC_STATIC_AVERAGE_SAMPLE 1019 28 | #define IDC_STATIC_AVERAGE_MIN_VALUE 1020 29 | #define IDC_STATIC_AVERAGE_MAX_VALUE 1021 30 | #define IDC_STATIC_AVERAGE_STEP_VALUE 1022 31 | #define IDC_STATIC_AVERAGE_SAMPLE_VALUE 1023 32 | 33 | // Next default values for new objects 34 | // 35 | #ifdef APSTUDIO_INVOKED 36 | #ifndef APSTUDIO_READONLY_SYMBOLS 37 | #define _APS_NEXT_RESOURCE_VALUE 105 38 | #define _APS_NEXT_COMMAND_VALUE 40001 39 | #define _APS_NEXT_CONTROL_VALUE 1024 40 | #define _APS_NEXT_SYMED_VALUE 101 41 | #endif 42 | #endif 43 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/compress_frame_fuzzer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * This fuzz target attempts to compress the fuzzed data with the simple 3 | * compression function with an output buffer that may be too small to 4 | * ensure that the compressor never crashes. 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "fuzz_helpers.h" 13 | #include "lz4.h" 14 | #include "lz4frame.h" 15 | #include "lz4_helpers.h" 16 | #include "fuzz_data_producer.h" 17 | 18 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 19 | { 20 | FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size); 21 | LZ4F_preferences_t const prefs = FUZZ_dataProducer_preferences(producer); 22 | size_t const dstCapacitySeed = FUZZ_dataProducer_retrieve32(producer); 23 | size = FUZZ_dataProducer_remainingBytes(producer); 24 | 25 | size_t const compressBound = LZ4F_compressFrameBound(size, &prefs); 26 | size_t const dstCapacity = FUZZ_getRange_from_uint32(dstCapacitySeed, 0, compressBound); 27 | 28 | char* const dst = (char*)malloc(dstCapacity); 29 | char* const rt = (char*)malloc(size); 30 | 31 | FUZZ_ASSERT(dst!=NULL); 32 | FUZZ_ASSERT(rt!=NULL); 33 | 34 | /* If compression succeeds it must round trip correctly. */ 35 | size_t const dstSize = 36 | LZ4F_compressFrame(dst, dstCapacity, data, size, &prefs); 37 | if (!LZ4F_isError(dstSize)) { 38 | size_t const rtSize = FUZZ_decompressFrame(rt, size, dst, dstSize); 39 | FUZZ_ASSERT_MSG(rtSize == size, "Incorrect regenerated size"); 40 | FUZZ_ASSERT_MSG(!memcmp(data, rt, size), "Corruption!"); 41 | } 42 | 43 | free(dst); 44 | free(rt); 45 | FUZZ_dataProducer_free(producer); 46 | 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /deps/lame/frontend/mp3x.c: -------------------------------------------------------------------------------- 1 | /* $Id: mp3x.c,v 1.28 2010/04/08 11:07:50 robert Exp $ */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | # include 5 | #endif 6 | 7 | #include 8 | 9 | #include "lame.h" 10 | #include "machine.h" 11 | #include "encoder.h" 12 | #include "lame-analysis.h" 13 | #include 14 | #include "parse.h" 15 | #include "get_audio.h" 16 | #include "gtkanal.h" 17 | #include "lametime.h" 18 | 19 | #include "main.h" 20 | #include "console.h" 21 | 22 | 23 | /************************************************************************ 24 | * 25 | * main 26 | * 27 | * PURPOSE: MPEG-1,2 Layer III encoder with GPSYCHO 28 | * psychoacoustic model. 29 | * 30 | ************************************************************************/ 31 | int 32 | lame_main(lame_t gf, int argc, char **argv) 33 | { 34 | unsigned char mp3buffer[LAME_MAXMP3BUFFER]; 35 | char outPath[PATH_MAX + 1]; 36 | char inPath[PATH_MAX + 1]; 37 | int ret; 38 | 39 | lame_set_errorf(gf, &frontend_errorf); 40 | lame_set_debugf(gf, &frontend_debugf); 41 | lame_set_msgf(gf, &frontend_msgf); 42 | if (argc <= 1) { 43 | usage(stderr, argv[0]); /* no command-line args */ 44 | return -1; 45 | } 46 | ret = parse_args(gf, argc, argv, inPath, outPath, NULL, NULL); 47 | if (ret < 0) { 48 | return ret == -2 ? 0 : 1; 49 | } 50 | (void) lame_set_analysis(gf, 1); 51 | 52 | if (init_infile(gf, inPath) < 0) { 53 | error_printf("Can't init infile '%s'\n", inPath); 54 | return 1; 55 | } 56 | lame_init_params(gf); 57 | lame_print_config(gf); 58 | 59 | gtk_init(&argc, &argv); 60 | gtkcontrol(gf, inPath); 61 | 62 | lame_encode_flush(gf, mp3buffer, sizeof(mp3buffer)); 63 | close_infile(); 64 | return 0; 65 | } 66 | -------------------------------------------------------------------------------- /deps/lame/frontend/timestatus.h: -------------------------------------------------------------------------------- 1 | /* 2 | * time status related function include file 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_TIMESTATUS_H 23 | #define LAME_TIMESTATUS_H 24 | 25 | #if defined(__cplusplus) 26 | extern "C" { 27 | #endif 28 | 29 | void encoder_progress_begin( lame_global_flags const* gfp 30 | , char const* inpath 31 | , char const* outpath ); 32 | void encoder_progress( lame_global_flags const* gfp ); 33 | void encoder_progress_end(lame_global_flags const* gfp); 34 | 35 | struct DecoderProgress; 36 | typedef struct DecoderProgress* DecoderProgress; 37 | 38 | DecoderProgress decoder_progress_init(unsigned long n, int framesize); 39 | void decoder_progress(DecoderProgress dp, const mp3data_struct *, int iread); 40 | void decoder_progress_finish(DecoderProgress dp); 41 | 42 | #if defined(__cplusplus) 43 | } 44 | #endif 45 | 46 | #endif /* LAME_TIMESTATUS_H */ 47 | -------------------------------------------------------------------------------- /deps/lame/dshow/UIDS.H: -------------------------------------------------------------------------------- 1 | /* 2 | * LAME MP3 encoder for DirectShow 3 | * CLSIDs of the filter and property pages 4 | * 5 | * Copyright (c) 2000-2005 Marie Orlova, Peter Gubanov, Vitaly Ivanov, Elecard Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | // {b8d27088-df5f-4b7c-98dc-0e91a1696286} 24 | DEFINE_GUID(CLSID_LAMEDShowFilter, 25 | 0xb8d27088, 0xff5f, 0x4b7c, 0x98, 0xdc, 0x0e, 0x91, 0xa1, 0x69, 0x62, 0x86); 26 | 27 | 28 | // {b8d27089-df5f-4b7c-98dc-0e91a1696286} 29 | DEFINE_GUID(CLSID_LAMEDShow_PropertyPage, 30 | 0xb8d27089, 0xff5f, 0x4b7c, 0x98, 0xdc, 0x0e, 0x91, 0xa1, 0x69, 0x62, 0x86); 31 | 32 | // {b8d2708a-df5f-4b7c-98dc-0e91a1696286} 33 | DEFINE_GUID(CLSID_LAMEDShow_PropertyPageAdv, 34 | 0xb8d2708a, 0xff5f, 0x4b7c, 0x98, 0xdc, 0x0e, 0x91, 0xa1, 0x69, 0x62, 0x86); 35 | 36 | // {FE69EDD1-04CB-11d5-994A-000021D1FE2F} 37 | DEFINE_GUID(CLSID_LAMEDShow_About, 38 | 0xfe69edd1, 0xf4cb, 0x11d5, 0x99, 0x4a, 0x0, 0x0, 0x21, 0xd1, 0xfe, 0x2f); 39 | 40 | DEFINE_GUID(MEDIASUBTYPE_MP3, 41 | 0x00000055, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); -------------------------------------------------------------------------------- /src/EncodeWorker.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __ENCODE_WORKER_HPP__ 2 | #define __ENCODE_WORKER_HPP__ 3 | 4 | #include 5 | #include 6 | #include "aacenc_lib.h" 7 | 8 | #include "EncodeData.h" 9 | 10 | class EncodeWorker : public Napi::AsyncProgressQueueWorker { 11 | public: 12 | EncodeWorker(const std::string& inputFileName, 13 | const std::string& outputFileName, 14 | int bitRate, 15 | int sampleRate, 16 | int channels, 17 | const Napi::Function& callback); 18 | EncodeWorker(const std::string& inputFileName, 19 | const std::string& outputFileName, 20 | int bitRate, 21 | int sampleRate, 22 | int channels, 23 | const Napi::Function& callback, 24 | const Napi::Function& progressCallback); 25 | void Execute(const ExecutionProgress& progress); 26 | void OnOK(); 27 | void OnError(const Napi::Error&); 28 | void OnProgress(const EncodeData* data, size_t count); 29 | static void setBitRate(int); 30 | static int getBitRate(); 31 | static void setProgressCallback(bool); 32 | static bool getProgressCallback(); 33 | 34 | private: 35 | int _bitRate; 36 | int _sampleRate; 37 | int _channels; 38 | 39 | int frame_cnt; 40 | void* pWav; 41 | 42 | AACENC_ERROR ErrorStatus; 43 | AACENC_InfoStruct encInfo; 44 | 45 | AACENC_BufDesc inBufDesc; 46 | AACENC_BufDesc outBufDesc; 47 | AACENC_InArgs inargs; 48 | AACENC_OutArgs outargs; 49 | INT_PCM inputBuffer[8 * 2048]; 50 | UCHAR ancillaryBuffer[50]; 51 | AACENC_MetaData metaDataSetup; 52 | UCHAR outputBuffer[8192]; 53 | UCHAR conf; 54 | 55 | std::string _wavPath; 56 | std::string _aacPath; 57 | Napi::FunctionReference onProgress; 58 | }; 59 | 60 | #endif // ! __ENCODE_WORKER_HPP__ 61 | -------------------------------------------------------------------------------- /deps/lz4/programs/datagen.h: -------------------------------------------------------------------------------- 1 | /* 2 | datagen.h - compressible data generator header 3 | Copyright (C) Yann Collet 2012-2016 4 | 5 | GPL v2 License 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along 18 | with this program; if not, write to the Free Software Foundation, Inc., 19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | 21 | You can contact the author at : 22 | - LZ4 source repository : https://github.com/lz4/lz4 23 | - Public forum : https://groups.google.com/forum/#!forum/lz4c 24 | */ 25 | 26 | 27 | #include /* size_t */ 28 | 29 | void RDG_genOut(unsigned long long size, double matchProba, double litProba, unsigned seed); 30 | void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba, unsigned seed); 31 | /* RDG_genOut 32 | Generate 'size' bytes of compressible data into stdout. 33 | Compressibility can be controlled using 'matchProba'. 34 | 'LitProba' is optional, and affect variability of bytes. If litProba==0.0, default value is used. 35 | Generated data can be selected using 'seed'. 36 | If (matchProba, litProba and seed) are equal, the function always generate the same content. 37 | 38 | RDG_genBuffer 39 | Same as RDG_genOut, but generate data into provided buffer 40 | */ 41 | -------------------------------------------------------------------------------- /deps/lame/README: -------------------------------------------------------------------------------- 1 | LAME 3.xx 2 | LAME Ain't an MP3 Encoder 3 | http://lame.sf.net 4 | May 2011 5 | 6 | Originally developed by Mike Cheng (www.uq.net.au/~zzmcheng) and was 7 | latter developed by Mark Taylor (www.mp3dev.org). Currently maintained 8 | by The LAME Project. 9 | 10 | This code is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 11 | (LGPL, see www.gnu.org), version 2. 12 | 13 | As LAME may contain software for which some companies may claim software 14 | patents, if you are in a location where software patents are recognized, it is 15 | suggested that you seek legal advice before deploying and/or redistributing 16 | LAME. 17 | 18 | In particular, it is suggested to visit 19 | 20 | http://www.mp3licensing.com/ 21 | 22 | if it applies to your jurisdiction. 23 | 24 | ============================================================================ 25 | 26 | see the file "INSTALL" for installation (compiling) instructions. 27 | see the file "USAGE" for the most up-to-date guide to the command line options. 28 | see the file "LICENSE" for details on how to use LAME in non-GPL programs. 29 | see the file "HACKING" if you are interested in working on LAME 30 | see the file "API" for details of the LAME encoding library API 31 | 32 | There is HTML documentation and a man page in the doc directory. 33 | 34 | ============================================================================ 35 | 36 | LAME uses the MPGLIB decoding engine, from the MPG123 package, written 37 | by: Michael Hipp (www.mpg123.de) MPGLIB is released under the GPL. 38 | 39 | Copyrights (c) 1999-2011 by The LAME Project 40 | Copyrights (c) 1999,2000,2001 by Mark Taylor 41 | Copyrights (c) 1998 by Michael Cheng 42 | Copyrights (c) 1995,1996,1997 by Michael Hipp: mpglib 43 | 44 | As well as additional copyrights as documented in the source code. 45 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/fuzz.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Fuzz target interface. 3 | * Fuzz targets have some common parameters passed as macros during compilation. 4 | * Check the documentation for each individual fuzzer for more parameters. 5 | * 6 | * @param FUZZ_RNG_SEED_SIZE: 7 | * The number of bytes of the source to look at when constructing a seed 8 | * for the deterministic RNG. These bytes are discarded before passing 9 | * the data to lz4 functions. Every fuzzer initializes the RNG exactly 10 | * once before doing anything else, even if it is unused. 11 | * Default: 4. 12 | * @param LZ4_DEBUG: 13 | * This is a parameter for the lz4 library. Defining `LZ4_DEBUG=1` 14 | * enables assert() statements in the lz4 library. Higher levels enable 15 | * logging, so aren't recommended. Defining `LZ4_DEBUG=1` is 16 | * recommended. 17 | * @param LZ4_FORCE_MEMORY_ACCESS: 18 | * This flag controls how the zstd library accesses unaligned memory. 19 | * It can be undefined, or 0 through 2. If it is undefined, it selects 20 | * the method to use based on the compiler. If testing with UBSAN set 21 | * MEM_FORCE_MEMORY_ACCESS=0 to use the standard compliant method. 22 | * @param FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION 23 | * This is the canonical flag to enable deterministic builds for fuzzing. 24 | * Changes to zstd for fuzzing are gated behind this define. 25 | * It is recommended to define this when building zstd for fuzzing. 26 | */ 27 | 28 | #ifndef FUZZ_H 29 | #define FUZZ_H 30 | 31 | #ifndef FUZZ_RNG_SEED_SIZE 32 | # define FUZZ_RNG_SEED_SIZE 4 33 | #endif 34 | 35 | #include 36 | #include 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int LLVMFuzzerTestOneInput(const uint8_t *src, size_t size); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /deps/lame/frontend/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * frontend/console.h 3 | * 4 | * This 5 | * 6 | * 7 | */ 8 | 9 | #ifndef LAME_CONSOLE_H 10 | #define LAME_CONSOLE_H 11 | 12 | #if defined(_WIN32) && !defined(__CYGWIN__) 13 | # include 14 | #endif 15 | 16 | #if defined(__cplusplus) 17 | extern "C" { 18 | #endif 19 | 20 | typedef struct console_io_struct { 21 | unsigned long ClassID; 22 | unsigned long ClassProt; 23 | FILE *Console_fp; /* filepointer to stream reporting information */ 24 | FILE *Error_fp; /* filepointer to stream fatal error reporting information */ 25 | FILE *Report_fp; /* filepointer to stream reports (normally a text file or /dev/null) */ 26 | #if defined(_WIN32) && !defined(__CYGWIN__) 27 | HANDLE Console_Handle; 28 | #endif 29 | int disp_width; 30 | int disp_height; 31 | char str_up[10]; 32 | char str_clreoln[10]; 33 | char str_emph[10]; 34 | char str_norm[10]; 35 | char Console_buff[2048]; 36 | int Console_file_type; 37 | } Console_IO_t; 38 | 39 | extern Console_IO_t Console_IO; 40 | extern int frontend_open_console(void); 41 | extern void frontend_close_console(void); 42 | 43 | extern void frontend_msgf(const char *format, va_list ap); 44 | extern void frontend_debugf(const char *format, va_list ap); 45 | extern void frontend_errorf(const char *format, va_list ap); 46 | extern void frontend_print_null(const char *format, va_list ap); 47 | 48 | int console_printf(const char *format, ...); 49 | int error_printf(const char *format, ...); 50 | int report_printf(const char *format, ...); 51 | 52 | void console_flush(void); 53 | void error_flush(void); 54 | void report_flush(void); 55 | 56 | void console_up(int n_lines); 57 | 58 | void set_debug_file(const char *fn); 59 | 60 | #if defined(__cplusplus) 61 | } 62 | #endif 63 | 64 | #endif /* LAME_CONSOLE_H */ 65 | 66 | /* end of console.h */ 67 | -------------------------------------------------------------------------------- /deps/lame/debian/control: -------------------------------------------------------------------------------- 1 | Source: lame 2 | Section: sound 3 | Priority: optional 4 | Maintainer: Rogério Brito 5 | Bugs: mailto:lame-dev@lists.sourceforge.net 6 | Homepage: http://lame.sourceforge.net/ 7 | Build-Depends: debhelper (>= 7.0.50~), 8 | libncurses5-dev, 9 | nasm [any-i386], 10 | libsndfile1-dev, 11 | autotools-dev 12 | Standards-Version: 3.9.1 13 | 14 | Package: lame 15 | Architecture: any 16 | Depends: ${shlibs:Depends}, ${misc:Depends} 17 | Description: open source MP3 encoder 18 | Lame is a program which can be used to create compressed 19 | audio files. (Lame aint MP3 encoder). These audio files 20 | can be played back by popular mp3 players such as mpg123. 21 | To read from stdin, use "-" for . To write to 22 | stdout, use a "-" for . 23 | . 24 | This package contains the frontend encoder binary. 25 | 26 | Package: libmp3lame0 27 | Architecture: any 28 | Section: libs 29 | Depends: ${shlibs:Depends}, ${misc:Depends} 30 | Description: shared libraries for MP3 encoding 31 | Lame is a program which can be used to create compressed 32 | audio files. (Lame aint MP3 encoder). These audio files 33 | can be played back by popular mp3 players such as mpg123. 34 | To read from stdin, use "-" for . To write to 35 | stdout, use a "-" for . 36 | . 37 | This package contains the dynamic library. 38 | 39 | Package: libmp3lame-dev 40 | Architecture: any 41 | Section: libdevel 42 | Depends: libmp3lame0 (= ${binary:Version}), ${misc:Depends} 43 | Description: development files for lame 44 | Lame is a program which can be used to create compressed 45 | audio files. (Lame aint MP3 encoder). These audio files 46 | can be played back by popular mp3 players such as mpg123. 47 | To read from stdin, use "-" for . To write to 48 | stdout, use a "-" for . 49 | . 50 | This package contains the static library and header files 51 | for development with lame. 52 | -------------------------------------------------------------------------------- /deps/lame/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.38 2010/10/30 13:21:01 robert Exp $ 2 | 3 | include $(top_srcdir)/Makefile.am.global 4 | 5 | .PHONY: test 6 | 7 | SUBDIRS = mpglib libmp3lame frontend Dll debian doc include misc dshow ACM \ 8 | mac macosx vc_solution 9 | 10 | CLEANFILES = testcase.new.mp3 11 | 12 | EXTRA_DIST = \ 13 | API \ 14 | DEFINES \ 15 | HACKING \ 16 | INSTALL.configure \ 17 | LICENSE \ 18 | Makefile.MSVC \ 19 | Makefile.unix \ 20 | Makefile.am.global \ 21 | README.WINGTK \ 22 | STYLEGUIDE \ 23 | USAGE \ 24 | configMS.h \ 25 | lame.bat \ 26 | lame.spec.in \ 27 | lame.spec \ 28 | testcase.mp3 \ 29 | testcase.wav 30 | 31 | # 32 | # The differences depend on the used processor architecture, the used 33 | # compiler and the used options for the compiler, so make test may 34 | # show some differences. You should only be concerned if you are a 35 | # LAME developer and the number of differences change after you 36 | # modified the source. 37 | # 38 | testcase.new.mp3: testcase.wav frontend/lame$(EXEEXT) 39 | time frontend/lame$(EXEEXT) --nores $(top_srcdir)/testcase.wav testcase.new.mp3 || $(RM_F) testcase.new.mp3 40 | 41 | test: testcase.mp3 testcase.new.mp3 42 | @echo 43 | @echo "The following output has value only for a LAME-developer, do not make _any_" 44 | @echo "assumptions about what this number means. You do not need to care about it." 45 | @cmp -l testcase.new.mp3 $(top_srcdir)/testcase.mp3 | wc -l 46 | 47 | testupdate: testcase.mp3 testcase.new.mp3 48 | cp testcase.new.mp3 $(top_srcdir)/testcase.mp3 49 | 50 | testg: frontend/mp3x$(EXEEXT) $(top_srcdir)/../test/castanets.wav 51 | frontend/mp3x$(EXEEXT) -h $(top_srcdir)/../test/castanets.wav 52 | 53 | update: 54 | cd $(top_srcdir) && CVS_RSH=ssh cvs -z3 -q update -dAP || true 55 | 56 | diff: 57 | cd $(top_srcdir) && CVS_RSH=ssh cvs -z3 diff -u || true 58 | 59 | frontend/lame$(EXEEXT): 60 | $(MAKE) $(MAKEFLAGS) 61 | 62 | frontend/mp3x$(EXEEXT): frontend/lame$(EXEEXT) 63 | 64 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/lz4_helpers.c: -------------------------------------------------------------------------------- 1 | #include "fuzz_helpers.h" 2 | #include "lz4_helpers.h" 3 | #include "lz4hc.h" 4 | 5 | LZ4F_frameInfo_t FUZZ_randomFrameInfo(uint32_t* seed) 6 | { 7 | LZ4F_frameInfo_t info = LZ4F_INIT_FRAMEINFO; 8 | info.blockSizeID = FUZZ_rand32(seed, LZ4F_max64KB - 1, LZ4F_max4MB); 9 | if (info.blockSizeID < LZ4F_max64KB) { 10 | info.blockSizeID = LZ4F_default; 11 | } 12 | info.blockMode = FUZZ_rand32(seed, LZ4F_blockLinked, LZ4F_blockIndependent); 13 | info.contentChecksumFlag = FUZZ_rand32(seed, LZ4F_noContentChecksum, 14 | LZ4F_contentChecksumEnabled); 15 | info.blockChecksumFlag = FUZZ_rand32(seed, LZ4F_noBlockChecksum, 16 | LZ4F_blockChecksumEnabled); 17 | return info; 18 | } 19 | 20 | LZ4F_preferences_t FUZZ_randomPreferences(uint32_t* seed) 21 | { 22 | LZ4F_preferences_t prefs = LZ4F_INIT_PREFERENCES; 23 | prefs.frameInfo = FUZZ_randomFrameInfo(seed); 24 | prefs.compressionLevel = FUZZ_rand32(seed, 0, LZ4HC_CLEVEL_MAX + 3) - 3; 25 | prefs.autoFlush = FUZZ_rand32(seed, 0, 1); 26 | prefs.favorDecSpeed = FUZZ_rand32(seed, 0, 1); 27 | return prefs; 28 | } 29 | 30 | size_t FUZZ_decompressFrame(void* dst, const size_t dstCapacity, 31 | const void* src, const size_t srcSize) 32 | { 33 | LZ4F_decompressOptions_t opts; 34 | memset(&opts, 0, sizeof(opts)); 35 | opts.stableDst = 1; 36 | LZ4F_dctx* dctx; 37 | LZ4F_createDecompressionContext(&dctx, LZ4F_VERSION); 38 | FUZZ_ASSERT(dctx); 39 | 40 | size_t dstSize = dstCapacity; 41 | size_t srcConsumed = srcSize; 42 | size_t const rc = 43 | LZ4F_decompress(dctx, dst, &dstSize, src, &srcConsumed, &opts); 44 | FUZZ_ASSERT(!LZ4F_isError(rc)); 45 | FUZZ_ASSERT(rc == 0); 46 | FUZZ_ASSERT(srcConsumed == srcSize); 47 | 48 | LZ4F_freeDecompressionContext(dctx); 49 | 50 | return dstSize; 51 | } 52 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/id3tag.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LAME_ID3_H 3 | #define LAME_ID3_H 4 | 5 | 6 | #define CHANGED_FLAG (1U << 0) 7 | #define ADD_V2_FLAG (1U << 1) 8 | #define V1_ONLY_FLAG (1U << 2) 9 | #define V2_ONLY_FLAG (1U << 3) 10 | #define SPACE_V1_FLAG (1U << 4) 11 | #define PAD_V2_FLAG (1U << 5) 12 | 13 | enum { 14 | MIMETYPE_NONE = 0, 15 | MIMETYPE_JPEG, 16 | MIMETYPE_PNG, 17 | MIMETYPE_GIF, 18 | }; 19 | 20 | typedef struct FrameDataNode { 21 | struct FrameDataNode *nxt; 22 | uint32_t fid; /* Frame Identifier */ 23 | char lng[4]; /* 3-character language descriptor */ 24 | struct { 25 | union { 26 | char *l; /* ptr to Latin-1 chars */ 27 | unsigned short *u; /* ptr to UCS-2 text */ 28 | unsigned char *b; /* ptr to raw bytes */ 29 | } ptr; 30 | size_t dim; 31 | int enc; /* 0:Latin-1, 1:UCS-2, 2:RAW */ 32 | } dsc , txt; 33 | } FrameDataNode; 34 | 35 | 36 | typedef struct id3tag_spec { 37 | /* private data members */ 38 | unsigned int flags; 39 | int year; 40 | char *title; 41 | char *artist; 42 | char *album; 43 | char *comment; 44 | int track_id3v1; 45 | int genre_id3v1; 46 | unsigned char *albumart; 47 | unsigned int albumart_size; 48 | unsigned int padding_size; 49 | int albumart_mimetype; 50 | FrameDataNode *v2_head, *v2_tail; 51 | } id3tag_spec; 52 | 53 | 54 | /* write tag into stream at current position */ 55 | extern int id3tag_write_v2(lame_global_flags * gfp); 56 | extern int id3tag_write_v1(lame_global_flags * gfp); 57 | /* 58 | * NOTE: A version 2 tag will NOT be added unless one of the text fields won't 59 | * fit in a version 1 tag (e.g. the title string is longer than 30 characters), 60 | * or the "id3tag_add_v2" or "id3tag_v2_only" functions are used. 61 | */ 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /deps/lame/libmp3lame/i386/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am,v 1.26 2011/04/04 09:42:34 aleidinger Exp $ 2 | 3 | AUTOMAKE_OPTIONS = foreign $(top_srcdir)/ansi2knr 4 | 5 | DEFS = @DEFS@ @CONFIG_DEFS@ 6 | 7 | ECHO ?= echo 8 | 9 | nasm_sources = \ 10 | choose_table.nas \ 11 | cpu_feat.nas \ 12 | fft3dn.nas \ 13 | fftsse.nas 14 | 15 | if HAVE_NASM 16 | noinst_LTLIBRARIES = liblameasmroutines.la 17 | liblameasmroutines_la_SOURCES = $(nasm_sources) 18 | am_liblameasmroutines_la_OBJECTS = \ 19 | choose_table$U.lo \ 20 | cpu_feat$U.lo \ 21 | fft3dn$U.lo \ 22 | fftsse$U.lo 23 | endif 24 | 25 | noinst_HEADERS = nasm.h 26 | 27 | INCLUDES = @INCLUDES@ -I$(top_srcdir)/libmp3lame/@CPUTYPE@ 28 | 29 | SUFFIXES = .nas .lo 30 | 31 | EXTRA_liblameasmroutines_la_SOURCES = $(nasm_sources) 32 | 33 | CLEANFILES = \ 34 | choose_table.o.lst \ 35 | choose_table.lo.lst \ 36 | cpu_feat.o.lst \ 37 | cpu_feat.lo.lst \ 38 | fft3dn.o.lst \ 39 | fft3dn.lo.lst \ 40 | fftsse.o.lst \ 41 | fftsse.lo.lst 42 | 43 | EXTRA_DIST = \ 44 | fft.nas \ 45 | fftfpu.nas \ 46 | ffttbl.nas \ 47 | scalar.nas 48 | 49 | NASM = @NASM@ 50 | NASMFLAGS=@NASM_FORMAT@ -i $(top_srcdir)/libmp3lame/@CPUTYPE@/ 51 | 52 | .nas.o: $< nasm.h 53 | $(NASM) $(NASMFLAGS) $< -o $@ -l $@.lst 54 | 55 | .nas.lo: $< nasm.h 56 | mkdir -p .libs 57 | $(ECHO) '# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)' >$@ 58 | $(ECHO) "pic_object='.libs/$*.o'" >>$@ 59 | $(ECHO) "non_pic_object='.libs/$*.o'" >>$@ 60 | $(NASM) $(NASMFLAGS) $< -o .libs/$*.o -l $@.lst 61 | 62 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 63 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 64 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ 65 | $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 66 | CCLD = $(CC) 67 | LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 68 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ 69 | 70 | 71 | #$(OBJECTS): libtool 72 | #libtool: $(LIBTOOL_DEPS) 73 | # $(SHELL) $(top_builddir)/config.status --recheck 74 | -------------------------------------------------------------------------------- /deps/lame/dshow/PropPage_adv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LAME MP3 encoder for DirectShow 3 | * Advanced property page 4 | * 5 | * Copyright (c) 2000-2005 Marie Orlova, Peter Gubanov, Vitaly Ivanov, Elecard Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | class CMpegAudEncPropertyPageAdv : public CBasePropertyPage 24 | { 25 | 26 | public: 27 | static CUnknown *CreateInstance( LPUNKNOWN punk, HRESULT *phr ); 28 | CMpegAudEncPropertyPageAdv( LPUNKNOWN punk, HRESULT *phr ); 29 | 30 | HRESULT OnConnect(IUnknown *pUnknown); 31 | HRESULT OnDisconnect(); 32 | HRESULT OnActivate(); 33 | HRESULT OnDeactivate(); 34 | HRESULT OnApplyChanges(); 35 | BOOL OnReceiveMessage(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 36 | 37 | private: 38 | void InitPropertiesDialog(HWND hwndParent); 39 | void EnableControls(HWND hwndParent, bool bEnable); 40 | void SetDirty(void); 41 | 42 | DWORD m_dwEnforceVBRmin; 43 | DWORD m_dwVoiceMode; 44 | DWORD m_dwKeepAllFreq; 45 | DWORD m_dwStrictISO; 46 | DWORD m_dwNoShortBlock; 47 | DWORD m_dwXingTag; 48 | DWORD m_dwChannelMode; 49 | DWORD m_dwForceMS; 50 | DWORD m_dwModeFixed; 51 | DWORD m_dwOverlap; 52 | DWORD m_dwSetStop; 53 | 54 | IAudioEncoderProperties *m_pAEProps; 55 | }; 56 | -------------------------------------------------------------------------------- /deps/lz4/Makefile.inc: -------------------------------------------------------------------------------- 1 | ifeq ($(V), 1) 2 | Q = 3 | else 4 | Q = @ 5 | endif 6 | 7 | TARGET_OS ?= $(shell uname) 8 | ifeq ($(TARGET_OS),) 9 | TARGET_OS ?= $(OS) 10 | endif 11 | 12 | ifneq (,$(filter Windows%,$(TARGET_OS))) 13 | LIBLZ4 = liblz4-$(LIBVER_MAJOR) 14 | LIBLZ4_EXP = liblz4.lib 15 | WINBASED = yes 16 | else 17 | LIBLZ4_EXP = liblz4.dll.a 18 | ifneq (,$(filter MINGW%,$(TARGET_OS))) 19 | LIBLZ4 = liblz4 20 | WINBASED = yes 21 | else 22 | ifneq (,$(filter MSYS%,$(TARGET_OS))) 23 | LIBLZ4 = msys-lz4-$(LIBVER_MAJOR) 24 | WINBASED = yes 25 | else 26 | ifneq (,$(filter CYGWIN%,$(TARGET_OS))) 27 | LIBLZ4 = cyglz4-$(LIBVER_MAJOR) 28 | WINBASED = yes 29 | else 30 | LIBLZ4 = liblz4.$(SHARED_EXT_VER) 31 | WINBASED = no 32 | EXT = 33 | endif 34 | endif 35 | endif 36 | endif 37 | 38 | ifeq ($(WINBASED),yes) 39 | EXT = .exe 40 | WINDRES = windres 41 | endif 42 | 43 | #determine if dev/nul based on host environment 44 | ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell uname))) 45 | VOID := /dev/null 46 | else 47 | ifneq (,$(filter Windows%,$(OS))) 48 | VOID := nul 49 | else 50 | VOID := /dev/null 51 | endif 52 | endif 53 | 54 | ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS%,$(shell uname))) 55 | POSIX_ENV = Yes 56 | else 57 | POSIX_ENV = No 58 | endif 59 | 60 | # Avoid symlinks when targetting Windows or building on a Windows host 61 | ifeq ($(WINBASED),yes) 62 | LN_S = cp -p 63 | LN_SF = cp -p 64 | else 65 | ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell uname))) 66 | LN_S = cp -p 67 | LN_SF = cp -p 68 | else 69 | ifneq (,$(filter Windows%,$(OS))) 70 | LN_S = cp -p 71 | LN_SF = cp -p 72 | else 73 | LN_S = ln -s 74 | LN_SF = ln -sf 75 | endif 76 | endif 77 | endif 78 | 79 | ifneq (,$(filter $(shell uname),SunOS)) 80 | INSTALL ?= ginstall 81 | else 82 | INSTALL ?= install 83 | endif 84 | 85 | INSTALL_PROGRAM ?= $(INSTALL) -m 755 86 | INSTALL_DATA ?= $(INSTALL) -m 644 87 | INSTALL_DIR ?= $(INSTALL) -d -m 755 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mishiro-core 2 | 3 | 4 | [![Build](https://github.com/toyobayashi/mishiro-core/workflows/Build/badge.svg)](https://github.com/toyobayashi/mishiro-core/actions?query=workflow%3ABuild) 5 | 6 | ``` bash 7 | $ npm install mishiro-core 8 | ``` 9 | 10 | ## Require 11 | 12 | * Node.js >= 10.8.0 || electron >= 4.0.0 (Node.js 10.11.0) 13 | * Python 2.7 14 | * [Windows] Visual Studio 2017/2019 with C++ build tools and .NET 15 | * [Linux] make & gcc & g++ 16 | * [MacOS] Xcode Command Line Tools 17 | 18 | ## Usage 19 | 20 | ``` javascript 21 | const { Downloader, Client, audio, util, config } = require('mishiro-core') 22 | 23 | let downloader = new Downloader() // download game resources 24 | 25 | const { 26 | acb2hca, 27 | acb2wav, 28 | acb2mp3, 29 | acb2aac, 30 | hca2wav, 31 | hca2mp3, 32 | hca2aac, 33 | wav2mp3, 34 | wav2aac, 35 | MP3Encoder, 36 | AACEncoder 37 | } = audio // decode music 38 | 39 | const { 40 | Lz4, // LZ4 decompression class 41 | unpackTexture2D // unpack pictures from unity3d assets bundle 42 | } = util 43 | 44 | const client = new Client('123456789:987654321:1a3b5c7d-1234-4bcd-9efa-8e6f4a2b7c5d') 45 | 46 | // check game resource version 47 | client.check().then(resVer => console.log(resVer)) 48 | 49 | // for more details, see index.d.ts and test. 50 | ``` 51 | 52 | ## Test 53 | 54 | ``` bash 55 | # use latest npm (6.10.2+ with node-gyp 5.x) 56 | # npm 6.9.0 use internal node-gyp whose version is v3 57 | # it's important to match the globally installed node-gyp version 58 | # because the location where node-gyp v5 cache the node header 59 | # is different from node-gyp v3 60 | $ npm install -g npm 61 | 62 | $ npm install -g node-gyp@9 63 | 64 | # install node C++ header 65 | $ node-gyp install # --target= 66 | 67 | $ npm install # --no-package-lock 68 | 69 | # npm run test-check 70 | # npm run test-download 71 | # npm run test-audio 72 | $ npm test 73 | ``` 74 | 75 | ## License 76 | * MIT 77 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/round_trip_fuzzer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * This fuzz target performs a lz4 round-trip test (compress & decompress), 3 | * compares the result with the original, and calls abort() on corruption. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "fuzz_helpers.h" 12 | #include "lz4.h" 13 | #include "fuzz_data_producer.h" 14 | 15 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 16 | { 17 | FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size); 18 | size_t const partialCapacitySeed = FUZZ_dataProducer_retrieve32(producer); 19 | size = FUZZ_dataProducer_remainingBytes(producer); 20 | 21 | size_t const partialCapacity = FUZZ_getRange_from_uint32(partialCapacitySeed, 0, size); 22 | size_t const dstCapacity = LZ4_compressBound(size); 23 | 24 | char* const dst = (char*)malloc(dstCapacity); 25 | char* const rt = (char*)malloc(size); 26 | 27 | FUZZ_ASSERT(dst); 28 | FUZZ_ASSERT(rt); 29 | 30 | /* Compression must succeed and round trip correctly. */ 31 | int const dstSize = LZ4_compress_default((const char*)data, dst, 32 | size, dstCapacity); 33 | FUZZ_ASSERT(dstSize > 0); 34 | 35 | int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); 36 | FUZZ_ASSERT_MSG(rtSize == size, "Incorrect size"); 37 | FUZZ_ASSERT_MSG(!memcmp(data, rt, size), "Corruption!"); 38 | 39 | /* Partial decompression must succeed. */ 40 | { 41 | char* const partial = (char*)malloc(partialCapacity); 42 | FUZZ_ASSERT(partial); 43 | int const partialSize = LZ4_decompress_safe_partial( 44 | dst, partial, dstSize, partialCapacity, partialCapacity); 45 | FUZZ_ASSERT(partialSize >= 0); 46 | FUZZ_ASSERT_MSG(partialSize == partialCapacity, "Incorrect size"); 47 | FUZZ_ASSERT_MSG(!memcmp(data, partial, partialSize), "Corruption!"); 48 | free(partial); 49 | } 50 | 51 | 52 | free(dst); 53 | free(rt); 54 | FUZZ_dataProducer_free(producer); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/standaloneengine.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "fuzz.h" 6 | 7 | /** 8 | * Main procedure for standalone fuzzing engine. 9 | * 10 | * Reads filenames from the argument array. For each filename, read the file 11 | * into memory and then call the fuzzing interface with the data. 12 | */ 13 | int main(int argc, char **argv) 14 | { 15 | int ii; 16 | for(ii = 1; ii < argc; ii++) 17 | { 18 | FILE *infile; 19 | printf("[%s] ", argv[ii]); 20 | 21 | /* Try and open the file. */ 22 | infile = fopen(argv[ii], "rb"); 23 | if(infile) 24 | { 25 | uint8_t *buffer = NULL; 26 | size_t buffer_len; 27 | 28 | printf("Opened.. "); 29 | 30 | /* Get the length of the file. */ 31 | fseek(infile, 0L, SEEK_END); 32 | buffer_len = ftell(infile); 33 | 34 | /* Reset the file indicator to the beginning of the file. */ 35 | fseek(infile, 0L, SEEK_SET); 36 | 37 | /* Allocate a buffer for the file contents. */ 38 | buffer = (uint8_t *)calloc(buffer_len, sizeof(uint8_t)); 39 | if(buffer) 40 | { 41 | /* Read all the text from the file into the buffer. */ 42 | fread(buffer, sizeof(uint8_t), buffer_len, infile); 43 | printf("Read %zu bytes, fuzzing.. ", buffer_len); 44 | 45 | /* Call the fuzzer with the data. */ 46 | LLVMFuzzerTestOneInput(buffer, buffer_len); 47 | 48 | printf("complete !!"); 49 | 50 | /* Free the buffer as it's no longer needed. */ 51 | free(buffer); 52 | buffer = NULL; 53 | } 54 | else 55 | { 56 | fprintf(stderr, 57 | "[%s] Failed to allocate %zu bytes \n", 58 | argv[ii], 59 | buffer_len); 60 | } 61 | 62 | /* Close the file as it's no longer needed. */ 63 | fclose(infile); 64 | infile = NULL; 65 | } 66 | else 67 | { 68 | /* Failed to open the file. Maybe wrong name or wrong permissions? */ 69 | fprintf(stderr, "[%s] Open failed. \n", argv[ii]); 70 | } 71 | 72 | printf("\n"); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /deps/fdk-aac/ChangeLog: -------------------------------------------------------------------------------- 1 | 2.0.2 2 | - Minor upstream updates 3 | - Lots of upstream and local fuzzing fixes 4 | - Added CMake project files 5 | - Removed the MSVC specific makefile 6 | 7 | 2.0.1 8 | - Minor release with a number of crash/fuzz fixes, primarily for the decoder 9 | 10 | 2.0.0 11 | - Major update in the upstream source base, with support for new 12 | profiles and features, and numerous crash/fuzz fixes. The new 13 | upstream version is referred to as FDKv2, thus skipping the 14 | major version 1 and syncing the fdk-aac major version number to 2. 15 | 16 | 0.1.6 17 | - Lots of minor assorted crash/fuzz fixes, mostly for the decoder but 18 | also some for the encoder 19 | 20 | 0.1.5 21 | - Updated upstream sources 22 | - Fixed building with GCC 3.3 and 3.4 23 | - Fixed building with GCC 6 24 | - AArch64 optimizations 25 | - Makefiles for building with MSVC 26 | - Support building the code in C++11 mode 27 | 28 | 0.1.4 29 | - Updated upstream sources, with minor changes to the decoder API 30 | breaking the ABI. (Calling code using AUDIO_CHANNEL_TYPE may need to 31 | be updated. A new option AAC_PCM_LIMITER_ENABLE has been added, enabled 32 | by default, which incurs extra decoding delay.) 33 | - PowerPC optimizations, fixes for building on AIX 34 | - Support for reading streamed wav files in the encoder example 35 | - Fix VBR encoding of sample rates over 64 kHz 36 | 37 | 0.1.3 38 | - Updated upstream sources, with a number of crash fixes and new features 39 | (including support for encoding 7.1) 40 | 41 | 0.1.2 42 | - Fix a few more crashes 43 | - Include dependency libs (such as -lm) in the pkg-config file 44 | 45 | 0.1.1 46 | - Updated to a new upstream version from Android 4.2, fixing a lot of crashes 47 | - Cleanup of autotools usage 48 | - Make sure the shared library links to libm if necessary 49 | - Performance improvements on x86 50 | - Added support for WG4/DVD audio channel mappings 51 | - Minimized the differences to upstream 52 | - Added an example encoder tool 53 | 54 | 0.1.0 55 | - Initial release of fdk-aac 56 | - autotools based build system 57 | - Enable setting VBR bitrate modes 58 | -------------------------------------------------------------------------------- /deps/lame/mac/Precompile_Common.h: -------------------------------------------------------------------------------- 1 | /* Common Precompiled headers for LAME on Macintosh Precompiled header source for building LAME on Macintosh using CodeWarrior. Includes most definitions normally generated by configure in config.h, except for the ones that vary from subproject to subproject */ #define TARGET_MAC_DLL 1 #ifndef _ALL_SOURCE /* #undef _ALL_SOURCE */ #endif #define HAVE_ALLOCA 1 #define HAVE_LONG_DOUBLE 1 #define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 #define WORDS_BIGENDIAN 1 #define uint8_t UInt8 #define uint16_t UInt16 #define uint32_t UInt32 #define uint64_t unsigned long long #define ieee854_float80_t long double #define ieee754_float64_t double #define ieee754_float32_t float #define SIZEOF_DOUBLE 8 #define SIZEOF_FLOAT 4 #define SIZEOF_INT 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG_LONG 8 #define SIZEOF_SHORT 2 #define SIZEOF_UNSIGNED_INT 4 #define SIZEOF_UNSIGNED_LONG 4 #define SIZEOF_UNSIGNED_LONG_LONG 8 #define SIZEOF_UNSIGNED_SHORT 2 #define HAVE_GETTIMEOFDAY 1 #define HAVE_SOCKET 1 #define HAVE_STRTOL 1 #define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 #define HAVE_LIMITS_H 1 #define HAVE_STRING_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_UNISTD_H 1 #define PACKAGE "lame" #define VERSION "3.91" #define PROTOTYPES 1 #define HAVE_IEEE854_FLOAT80 1 #define LIMIT_STACK_USAGE 1 // The following definitions have been pulled out to specific targets' // pch files: // LAME_LIBRARY_BUILD 1 for building the DLL // LIBSNDFILE 1 for building with LibSndFile, applies // only to CLI encoder // NOANALYSIS 1 for building without hooks for the // MP3 frame analyzer // HAVE_MPGLIB 1 for building with MP3 decoding library. // Note MPGLIB, unlike LAME itself, is // GPL as opposed to LGPL and thus unsuitable // for compilation into a DLL that would be used // from a closed-source app. // USE_LAYER_1 1 for building layer-1 decoding into MPGLIB // USE_LAYER_2 1 for building layer-2 decoding into MPGLIB // HAVE_VORBIS 1 for building vorbis support // NDEBUG 1 for building with debug info // BRHIST 1 for histogram display in CLI encoder #define HAVE_TERMCAP 1 #include -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/meson/examples/meson.build: -------------------------------------------------------------------------------- 1 | # ############################################################################# 2 | # Copyright (c) 2018-present lzutao 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ############################################################################# 9 | 10 | lz4_root_dir = '../../../..' 11 | 12 | #examples_c_args = ['-Wextra', '-Wundef', '-Wshadow', '-Wcast-align', '-Wstrict-prototypes'] 13 | 14 | printVersion = executable('printVersion', 15 | join_paths(lz4_root_dir, 'examples/printVersion.c'), 16 | dependencies: liblz4_dep, 17 | install: false) 18 | doubleBuffer = executable('doubleBuffer', 19 | join_paths(lz4_root_dir, 'examples/blockStreaming_doubleBuffer.c'), 20 | dependencies: liblz4_dep, 21 | install: false) 22 | dictionaryRandomAccess = executable('dictionaryRandomAccess', 23 | join_paths(lz4_root_dir, 'examples/dictionaryRandomAccess.c'), 24 | dependencies: liblz4_dep, 25 | install: false) 26 | ringBuffer = executable('ringBuffer', 27 | join_paths(lz4_root_dir, 'examples/blockStreaming_ringBuffer.c'), 28 | dependencies: liblz4_dep, 29 | install: false) 30 | ringBufferHC = executable('ringBufferHC', 31 | join_paths(lz4_root_dir, 'examples/HCStreaming_ringBuffer.c'), 32 | dependencies: liblz4_dep, 33 | install: false) 34 | lineCompress = executable('lineCompress', 35 | join_paths(lz4_root_dir, 'examples/blockStreaming_lineByLine.c'), 36 | dependencies: liblz4_dep, 37 | install: false) 38 | frameCompress = executable('frameCompress', 39 | join_paths(lz4_root_dir, 'examples/frameCompress.c'), 40 | dependencies: liblz4_dep, 41 | install: false) 42 | compressFunctions = executable('compressFunctions', 43 | join_paths(lz4_root_dir, 'examples/compress_functions.c'), 44 | dependencies: liblz4_dep, 45 | install: false) 46 | simpleBuffer = executable('simpleBuffer', 47 | join_paths(lz4_root_dir, 'examples/simple_buffer.c'), 48 | dependencies: liblz4_dep, 49 | install: false) 50 | -------------------------------------------------------------------------------- /deps/lz4/tests/test_custom_block_sizes.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env sh 2 | set -e 3 | 4 | LZ4=../lz4 5 | CHECKFRAME=./checkFrame 6 | DATAGEN=./datagen 7 | 8 | failures="" 9 | 10 | TMPFILE=/tmp/test_custom_block_sizes.$$ 11 | TMPFILE1=/tmp/test_custom_block_sizes1.$$ 12 | TMPFILE2=/tmp/test_custom_block_sizes2.$$ 13 | $DATAGEN -g12345678 > $TMPFILE1 14 | $DATAGEN -g12345678 > $TMPFILE2 15 | 16 | echo Testing -B31 17 | $LZ4 -f -B31 $TMPFILE1 && failures="31 (should fail) " 18 | 19 | for blocksize in 32 65535 65536 20 | do 21 | echo Testing -B$blocksize 22 | $LZ4 -f -B$blocksize $TMPFILE1 23 | $LZ4 -f -B$blocksize $TMPFILE2 24 | cat $TMPFILE1.lz4 $TMPFILE2.lz4 > $TMPFILE.lz4 25 | $CHECKFRAME -B$blocksize -b4 $TMPFILE.lz4 || failures="$failures $blocksize " 26 | done 27 | 28 | for blocksize in 65537 262143 262144 29 | do 30 | echo Testing -B$blocksize 31 | $LZ4 -f -B$blocksize $TMPFILE1 32 | $LZ4 -f -B$blocksize $TMPFILE2 33 | cat $TMPFILE1.lz4 $TMPFILE2.lz4 > $TMPFILE.lz4 34 | $CHECKFRAME -B$blocksize -b5 $TMPFILE.lz4 || failures="$failures $blocksize " 35 | done 36 | 37 | for blocksize in 262145 1048575 1048576 38 | do 39 | echo Testing -B$blocksize 40 | $LZ4 -f -B$blocksize $TMPFILE1 41 | $LZ4 -f -B$blocksize $TMPFILE2 42 | cat $TMPFILE1.lz4 $TMPFILE2.lz4 > $TMPFILE.lz4 43 | $CHECKFRAME -B$blocksize -b6 $TMPFILE.lz4 || failures="$failures $blocksize " 44 | done 45 | 46 | for blocksize in 1048577 4194303 4194304 47 | do 48 | echo Testing -B$blocksize 49 | $LZ4 -f -B$blocksize $TMPFILE1 50 | $LZ4 -f -B$blocksize $TMPFILE2 51 | cat $TMPFILE1.lz4 $TMPFILE2.lz4 > $TMPFILE.lz4 52 | $CHECKFRAME -B$blocksize -b7 $TMPFILE.lz4 || failures="$failures $blocksize " 53 | done 54 | 55 | for blocksize in 4194305 10485760 56 | do 57 | echo Testing -B$blocksize 58 | $LZ4 -f -B$blocksize $TMPFILE1 59 | $LZ4 -f -B$blocksize $TMPFILE2 60 | cat $TMPFILE1.lz4 $TMPFILE2.lz4 > $TMPFILE.lz4 61 | $CHECKFRAME -B4194304 -b7 $TMPFILE.lz4 || failures="$failures $blocksize " 62 | done 63 | 64 | rm $TMPFILE.lz4 $TMPFILE1 $TMPFILE1.lz4 $TMPFILE2 $TMPFILE2.lz4 65 | if [ "$failures" == "" ] 66 | then 67 | echo ---- All tests passed 68 | exit 0 69 | else 70 | echo ---- The following tests had failures: $failures 71 | exit 1 72 | fi 73 | -------------------------------------------------------------------------------- /deps/lz4/lib/lz4frame_static.h: -------------------------------------------------------------------------------- 1 | /* 2 | LZ4 auto-framing library 3 | Header File for static linking only 4 | Copyright (C) 2011-2016, Yann Collet. 5 | 6 | BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following disclaimer 16 | in the documentation and/or other materials provided with the 17 | distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | You can contact the author at : 32 | - LZ4 source repository : https://github.com/lz4/lz4 33 | - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c 34 | */ 35 | 36 | #ifndef LZ4FRAME_STATIC_H_0398209384 37 | #define LZ4FRAME_STATIC_H_0398209384 38 | 39 | /* The declarations that formerly were made here have been merged into 40 | * lz4frame.h, protected by the LZ4F_STATIC_LINKING_ONLY macro. Going forward, 41 | * it is recommended to simply include that header directly. 42 | */ 43 | 44 | #define LZ4F_STATIC_LINKING_ONLY 45 | #include "lz4frame.h" 46 | 47 | #endif /* LZ4FRAME_STATIC_H_0398209384 */ 48 | -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/meson/programs/meson.build: -------------------------------------------------------------------------------- 1 | # ############################################################################# 2 | # Copyright (c) 2018-present lzutao 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ############################################################################# 9 | 10 | lz4_root_dir = '../../../..' 11 | 12 | lz4_includes = include_directories(join_paths(lz4_root_dir, 'programs')) 13 | lz4_sources = [join_paths(lz4_root_dir, 'programs/bench.c'), 14 | join_paths(lz4_root_dir, 'programs/datagen.c'), 15 | join_paths(lz4_root_dir, 'programs/lz4cli.c'), 16 | join_paths(lz4_root_dir, 'programs/lz4io.c')] 17 | lz4_c_args = [] 18 | 19 | export_dynamic_on_windows = false 20 | # explicit backtrace enable/disable for Linux & Darwin 21 | if not use_backtrace 22 | lz4_c_args += '-DBACKTRACE_ENABLE=0' 23 | elif use_debug and host_machine_os == os_windows # MinGW target 24 | lz4_c_args += '-DBACKTRACE_ENABLE=1' 25 | export_dynamic_on_windows = true 26 | endif 27 | 28 | lz4_deps = [ liblz4_dep ] 29 | 30 | lz4 = executable('lz4', 31 | lz4_sources, 32 | include_directories: lz4_includes, 33 | c_args: lz4_c_args, 34 | dependencies: lz4_deps, 35 | export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0 36 | install: true) 37 | 38 | # ============================================================================= 39 | # Programs and manpages installing 40 | # ============================================================================= 41 | 42 | install_man(join_paths(lz4_root_dir, 'programs/lz4.1')) 43 | 44 | InstallSymlink_py = '../InstallSymlink.py' 45 | lz4_man1_dir = join_paths(lz4_mandir, 'man1') 46 | bin_EXT = host_machine_os == os_windows ? '.exe' : '' 47 | man1_EXT = meson.version().version_compare('>=0.49.0') ? '.1' : '.1.gz' 48 | 49 | foreach f : ['lz4c', 'lz4cat', 'unlz4'] 50 | meson.add_install_script(InstallSymlink_py, 'lz4' + bin_EXT, f + bin_EXT, lz4_bindir) 51 | meson.add_install_script(InstallSymlink_py, 'lz4' + man1_EXT, f + man1_EXT, lz4_man1_dir) 52 | endforeach 53 | -------------------------------------------------------------------------------- /deps/lame/mpglib/interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2010 The L.A.M.E. project 3 | * 4 | * Initially written by Michael Hipp, see also AUTHORS and README. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef INTERFACE_H_INCLUDED 23 | #define INTERFACE_H_INCLUDED 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #include "common.h" 30 | 31 | int InitMP3(PMPSTR mp); 32 | int decodeMP3(PMPSTR mp, unsigned char *inmemory, int inmemsize, char *outmemory, 33 | int outmemsize, int *done); 34 | void ExitMP3(PMPSTR mp); 35 | 36 | /* added decodeMP3_unclipped to support returning raw floating-point values of samples. The representation 37 | of the floating-point numbers is defined in mpg123.h as #define real. It is 64-bit double by default. 38 | No more than 1152 samples per channel are allowed. */ 39 | int decodeMP3_unclipped(PMPSTR mp, unsigned char *inmemory, int inmemsize, char *outmemory, 40 | int outmemsize, int *done); 41 | 42 | /* added remove_buf to support mpglib seeking */ 43 | void remove_buf(PMPSTR mp); 44 | 45 | /* added audiodata_precedesframes to return the number of bitstream frames the audio data will precede the 46 | current frame by for Layer 3 data. Aids seeking. 47 | */ 48 | int audiodata_precedesframes(PMPSTR mp); 49 | 50 | /* Resets decoding. Aids seeking. */ 51 | void decode_reset(PMPSTR mp); 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | #endif 57 | -------------------------------------------------------------------------------- /deps/lz4/ossfuzz/compress_fuzzer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * This fuzz target attempts to compress the fuzzed data with the simple 3 | * compression function with an output buffer that may be too small to 4 | * ensure that the compressor never crashes. 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "fuzz_helpers.h" 13 | #include "fuzz_data_producer.h" 14 | #include "lz4.h" 15 | 16 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 17 | { 18 | FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size); 19 | size_t const dstCapacitySeed = FUZZ_dataProducer_retrieve32(producer); 20 | size = FUZZ_dataProducer_remainingBytes(producer); 21 | 22 | size_t const compressBound = LZ4_compressBound(size); 23 | size_t const dstCapacity = FUZZ_getRange_from_uint32(dstCapacitySeed, 0, compressBound); 24 | 25 | char* const dst = (char*)malloc(dstCapacity); 26 | char* const rt = (char*)malloc(size); 27 | 28 | FUZZ_ASSERT(dst); 29 | FUZZ_ASSERT(rt); 30 | 31 | /* If compression succeeds it must round trip correctly. */ 32 | { 33 | int const dstSize = LZ4_compress_default((const char*)data, dst, 34 | size, dstCapacity); 35 | if (dstSize > 0) { 36 | int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); 37 | FUZZ_ASSERT_MSG(rtSize == size, "Incorrect regenerated size"); 38 | FUZZ_ASSERT_MSG(!memcmp(data, rt, size), "Corruption!"); 39 | } 40 | } 41 | 42 | if (dstCapacity > 0) { 43 | /* Compression succeeds and must round trip correctly. */ 44 | int compressedSize = size; 45 | int const dstSize = LZ4_compress_destSize((const char*)data, dst, 46 | &compressedSize, dstCapacity); 47 | FUZZ_ASSERT(dstSize > 0); 48 | int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); 49 | FUZZ_ASSERT_MSG(rtSize == compressedSize, "Incorrect regenerated size"); 50 | FUZZ_ASSERT_MSG(!memcmp(data, rt, compressedSize), "Corruption!"); 51 | } 52 | 53 | free(dst); 54 | free(rt); 55 | FUZZ_dataProducer_free(producer); 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /deps/lz4/contrib/meson/meson/lib/meson.build: -------------------------------------------------------------------------------- 1 | # ############################################################################# 2 | # Copyright (c) 2018-present lzutao 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ############################################################################# 9 | 10 | lz4_root_dir = '../../../..' 11 | 12 | liblz4_includes = [include_directories(join_paths(lz4_root_dir, 'lib'))] 13 | liblz4_sources = [join_paths(lz4_root_dir, 'lib/lz4.c'), 14 | join_paths(lz4_root_dir, 'lib/lz4frame.c'), 15 | join_paths(lz4_root_dir, 'lib/lz4hc.c'), 16 | join_paths(lz4_root_dir, 'lib/xxhash.c')] 17 | liblz4_c_args = [] 18 | 19 | liblz4_debug_cflags = [] 20 | if use_debug 21 | liblz4_c_args += '-DLZ4_DEBUG=@0@'.format(debug_level) 22 | if [compiler_gcc, compiler_clang].contains(cc_id) 23 | liblz4_debug_cflags = ['-Wextra', '-Wcast-qual', '-Wcast-align', '-Wshadow', 24 | '-Wswitch-enum', '-Wdeclaration-after-statement', '-Wstrict-prototypes', 25 | '-Wundef', '-Wpointer-arith', '-Wstrict-aliasing=1'] 26 | endif 27 | endif 28 | liblz4_c_args += cc.get_supported_arguments(liblz4_debug_cflags) 29 | 30 | if host_machine_os == os_windows and default_library != 'static' 31 | liblz4_c_args += '-DLZ4_DLL_EXPORT=1' 32 | endif 33 | 34 | liblz4 = library('lz4', 35 | liblz4_sources, 36 | include_directories: liblz4_includes, 37 | c_args: liblz4_c_args, 38 | install: true, 39 | version: lz4_libversion) 40 | 41 | liblz4_dep = declare_dependency(link_with: liblz4, 42 | include_directories: liblz4_includes) 43 | 44 | pkgconfig.generate(liblz4, 45 | name: 'lz4', 46 | filebase: 'liblz4', 47 | description: 'extremely fast lossless compression algorithm library', 48 | version: lz4_libversion, 49 | url: 'http://www.lz4.org/') 50 | 51 | install_headers(join_paths(lz4_root_dir, 'lib/lz4.h'), 52 | join_paths(lz4_root_dir, 'lib/lz4hc.h'), 53 | join_paths(lz4_root_dir, 'lib/lz4frame.h')) 54 | 55 | if default_library != 'shared' 56 | install_headers(join_paths(lz4_root_dir, 'lib/lz4frame_static.h')) 57 | endif 58 | --------------------------------------------------------------------------------