TooTallNate / node-speaker

Output PCM audio data to the speakers
655 stars 147 forks source link

Crashes when using in electron app #164

Open blackus3r opened 3 years ago

blackus3r commented 3 years ago

I'm getting the following error when I use this package in an electron app:

../src/binding.c:48: speaker_open: Assertionnapi_get_value_int32(env, args[0], &ao->channels) == napi_ok' failed.`

Node version: 12.8.3 Electron: 12.0.1

I hope that somebody could help me.

blackus3r commented 3 years ago

The same code runs fine when I build the app for Mac. Currently I'm using the following dependencies

"electron": "^13.1.6",
"electron-builder": "^22.11.7",
"speaker": "^0.5.3",
blackus3r commented 3 years ago

Problem was solved. There was a missing Number.parseInt in the node.js code for the options. This issue can be closed.

jduhking commented 1 year ago

Do you mind showing me your setup for electron?