Skip to content

Commit

Permalink
fix: dyld missing symbol called on arm arch (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLinCool committed Mar 9, 2024
1 parent bb37897 commit a84da82
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions deps/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Binary file added tests/frame.opus
Binary file not shown.
13 changes: 13 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
@@ -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');

0 comments on commit a84da82

Please sign in to comment.