From a84da82bacde33a7bc2da4fd9962674bb20ce9ce Mon Sep 17 00:00:00 2001 From: JacobLinCool Date: Sat, 9 Mar 2024 17:35:47 +0800 Subject: [PATCH] fix: dyld missing symbol called on arm arch (#150) --- deps/binding.gyp | 1 + package.json | 3 ++- tests/frame.opus | Bin 0 -> 960 bytes tests/test.js | 13 +++++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/frame.opus create mode 100644 tests/test.js diff --git a/deps/binding.gyp b/deps/binding.gyp index 06bb045..37361e2 100644 --- a/deps/binding.gyp +++ b/deps/binding.gyp @@ -211,6 +211,7 @@ "opus/celt/arm/armcpu.c", "opus/celt/arm/celt_neon_intr.c", "opus/celt/arm/pitch_neon_intr.c", + "opus/silk/arm/LPC_inv_pred_gain_neon_intr.c", ], "include_dirs": [ "opus", diff --git a/package.json b/package.json index b40e71a..5bfe5dd 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "install": "node-pre-gyp install --fallback-to-build", "build": "node-pre-gyp install build package", "lint": "prettier --check . && eslint lib --format=pretty", - "lint:fix": "prettier --write . && eslint lib --fix --format=pretty" + "lint:fix": "prettier --write . && eslint lib --fix --format=pretty", + "test": "node tests/test.js" }, "keywords": [ "native", diff --git a/tests/frame.opus b/tests/frame.opus new file mode 100644 index 0000000000000000000000000000000000000000..91961dc3c5edbd26560358e236d1472f62f7d134 GIT binary patch literal 960 zcmV;x13&x-%-s9MXm6;K{71k!BZ5;dy;no_7q0x~Mz|M7XSd(bHLfKw_NQG$!KH&K z_3(W5ym<5r>ctj%YF~NyAikijQH@#g)ZS+d77a@A-vl8%2Q^UyU|i&O?#eGmNfdsl z=$%p0&eB?~(E4vfL)>0*Ch*VvFaY50+zk->n-xq)@7cOuv$<9(ey0-U@R5+Ed3Zo` z6e~v%RR=|71XBt^o+;w&V8n3{_@o-s#piQ31w+t*q#4nV$Fxzi#1jKS_5`h2jkpQ; z6>{-O7cC?13-!>GpekVXNc*gqG^$RZPv2^~Pi<3>gT_&w*|Dn_Bd|zXybutaKt8K) zQJIi-$jTo6kMA#-bqZe@w6yah_=fGc6r4}H_Bj_MI-u4^!}yOeFyxoORsP=Aux2+s zS|ELi&SRCLKX*t4&o*iaxPZSUbNRyAB~29sxcds~MiQzi$HwD>J?2*)wn&{U&2?K@ z^M{xy_HlaTyaJ~QuFph*_q9HURBnAUAm2z!iD8s97gKjQ8tz;#W|N;bg0IkWWDerq zFC`QZ$K8EpNK=|4<<0L=*~^!21|gjt1?Dp2vXw@py*F0yjfu>~&tBVa(3SH%8N+Dh zNOAWzg^OGl2K)M=nhT^4F#4G0k6Lf-c3Qa2~0rX2A?Gp z9;G1?V8U6d;;Y{m(6aB-i5p1WHdk@aM@;`tPJ;5RrG_195kg0k*{B5Zrt4iMr4KMb zth+|$RMUAYUk7-X&|!BeQQo|M%+Av|j!%w7V~!<1Ccv-Oro7a}IEZ0xbjRSm#tr^; z5=H}`dLeyJHfAGu@mOh#XpugoXamw6%{KDD6Fl*0g~0nnj$q81p^&k;*SJC!=xVN=ZOBlUv+p;8DP{Mh+_Jdn`7m2#_jZkwCxCj1HxUa z9B(TesR)0Bimv3M4c}@Gc4Z|fB{|F$n|7KFl47P#FM(Zo9T|}Yh^vu)Wj-G`QDgZt5P#QYFs05|X-!N>m_83B181dFwO+VeA5Y!U-m8^SY=Wh@`{_lx%PX zZl0l1WzmP)g)OhQ#U4o!Pjyo*=TP~z8nY0f>?iutmloc--b)eEfxm@5^^12#d*Rt} iA}@tK;h+M-#(O>94jpe+Jvi5$WwB3qz>l~q_*V{H%Fx^Z literal 0 HcmV?d00001 diff --git a/tests/test.js b/tests/test.js new file mode 100644 index 0000000..a870464 --- /dev/null +++ b/tests/test.js @@ -0,0 +1,13 @@ +const assert = require('node:assert'); +const fs = require('node:fs'); +const path = require('node:path'); +const { OpusEncoder } = require('../lib/index.js'); + +const opus = new OpusEncoder(16_000, 1); + +const frame = fs.readFileSync(path.join(__dirname, 'frame.opus')); + +const decoded = opus.decode(frame); + +assert(decoded.length === 640, 'Decoded frame length is not 640'); +console.log('Passed');