Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,21 @@ Emits events about **overruns**, **short reads**, deviating **sample rates** or

## Compatibility

Tested (module compiles and records audio) with the following Node versions:

- `v6.17.1 (lts/boron)`
- `v8.9.4`
- `v8.11.3`
- `v8.17.0 (lts/carbon)`
- `v10.22.1 (lts/dubnium)`
- `v12.14.1`
- `v12.18.4 (lts/erbium)`
- `v14.16.0 (lts/fermium)`
- `v15.11.0`
- `v16.13.0 (lts/gallium)`
- `v17.1.0`
- `v18.11.0` (successfully built, but audio recording not tested)
- `v19.0.0 (current)`
Version `0.4.0` is the first version to use Node-API. It should be compatible with all modern Node.js versions (>=10.x).

Version `0.3.0` was the last version to use NAN. It was tested with Node.js `v6.17.1 (lts/boron)` through `v19.0.0`.

## Dependencies

To build native Node.js modules, this projects uses [node-gyp](https://github.com/nodejs/node-gyp), which requires[[1]](https://github.com/nodejs/node-gyp#on-unix):

- Python v3.6, v3.7, v3.8, or v3.9
- make
- A proper C/C++ compiler toolchain, like GCC (must support 'c++17')
)
- A proper C/C++ compiler toolchain, like GCC

This module also requires a `libasound2-dev` for `<alsa/asoundlib.h>` and `libasound2` to link against `libasound.so.2`.

On debian derivatives system you can install all dependencies with `apt`:
On Debian derivatives system you can install all dependencies with `apt`:

```bash
sudo apt install libasound2 libasound2-dev
Expand Down
23 changes: 11 additions & 12 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"targets": [
{
"target_name": "capture",
"sources": ["capture.cc"],
"libraries": ["-lasound -lm"],
"cflags": ["-Wall", "-std=c++17"],
"cflags_cc": ["-Wall", "-std=c++17"],
"cflags!": ["-fno-exceptions"],
"cflags_cc!": ["-fno-exceptions"],
"include_dirs": ["<!(node -e \"require('nan')\")"],
}
]
"targets": [
{
"target_name": "capture",
"sources": [ "capture.cc" ],
"libraries": [ "-lasound", "-lm" ],
"cflags_cc": [ "-std=c++11" ],
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"defines": [ "NAPI_VERSION=8" ]
}
]
}
Loading