Native Node.js bindings for PortAudio
  • C 94.2%
  • JavaScript 4.9%
  • Python 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Andrew Gundersen 833ee8de9c Add LICENSE
2023-06-28 13:16:07 +00:00
portaudio New PortAudio build, refined linking config, updated README.md 2022-03-10 07:20:38 -06:00
src fixed fs, updated README 2022-04-28 10:30:26 -05:00
test cancel playback functionality, on write event 2021-08-26 09:04:25 -05:00
.gitignore moved to yarn, updated README and .gitignore 2022-03-14 09:50:03 -05:00
.npmrc New PortAudio build, refined linking config, updated README.md 2022-03-10 07:20:38 -06:00
binding.gyp New PortAudio build, refined linking config, updated README.md 2022-03-10 07:20:38 -06:00
index.js read write switch stream test, .npmrc for publishing 2021-08-19 15:16:01 -05:00
LICENSE Add LICENSE 2023-06-28 13:16:07 +00:00
package-lock.json New PortAudio build, refined linking config, updated README.md 2022-03-10 07:20:38 -06:00
package.json New PortAudio build, refined linking config, updated README.md 2022-03-10 07:20:38 -06:00
README.md fixed fs, updated README 2022-04-28 10:30:26 -05:00

nodeaudio

Building

Clean and build:

node-gyp rebuild

There is a custom, prebuilt PortAudio library (libportaudio.dylib) in portaudio/bin that is copied over to the rpath (build/Release) before the actual build. During build, it is dynamically linked to nodeaudio.node (the main binary). This will NOT work (potentially at runtime) unless PortAudio has the correct install path. Run through the steps below if libportaudio.dylib changes:

Update the install path of PortAudio:

install_name_tool -id "@loader_path/libportaudio.dylib" libportaudio.dylib

To see what libraries a Mach-O exe requires:

otool -L build/Release/nodeAudio.node

Publishing

The publishing config is defined in .npmrc (url and credentials). API_TOKEN is a GitLab token with the api scope.

As of writing, publishing will fail if there is already a package in the registry.

!! NPM vs Yarn

I was unable to figure out how to publish to the private GitLab repo using npm (400 Bad Request). This may just be a bug in npm. For real, this threw me for a loop. I had to switch to Yarn for this reason (v1.22.17). Pulling with npm works fine though (for other repos).

TODO

Sign on build