AudioNet / node-core-audio

Bindings for PortAudio giving JavaScript access to sound card samples (mostly unmaintained)
MIT License
330 stars 67 forks source link

undefined symbol: Pa_Terminate Debian 8 #58

Closed YokiToki closed 8 years ago

YokiToki commented 8 years ago

Using nw.js respond following error:

Uncaught Error: /home/tamat/sandbox/NwJS/spectrum analyzer/node_modules/node-core-audio/build/Release/NodeCoreAudio.node: undefined symbol: Pa_Terminate module.js:346 

This module is available for use in nw.js?

rmedaer commented 8 years ago

Hi @YokiToki ,

Could you try to launch node with LD_PRELOAD pointing to portaudio lib ? Something like:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libportaudio.so node <your-script>.js

If it's working, it's a linking issue with node-gyp. FYI, I will refactor it in #61 ;-)

YokiToki commented 8 years ago

LD_PRELOAD=/usr/local/lib/libportaudio.so node index.js works fine, thanks. But if I using node-core-audio in nw.js cd /home/user/app/path LD_PRELOAD=/usr/local/lib/libportaudio.so nw .

"Uncaught Error: /home/tamat/sandbox/NwJS/spectrum analyzer/node_modules/node-core-audio/build/Release/NodeCoreAudio.node: undefined symbol: _ZNK2v85Value9ToIntegerEv", source: module.js (346)

rmedaer commented 8 years ago

Did you (re)build node-core-audio with nw-gyp ?

cd node_modules/node-core-audio
nw-gyp rebuild --target=<your-nwjs-version>
rmedaer commented 8 years ago

@YokiToki , can you confirm it's working with nwjs ? I tried this morning and it seems OK for me ..

YokiToki commented 8 years ago

I have another problem, so I can't confirm that it's fully working now. But that solved problem with "Pa_Terminate" error in node and nw.

rmedaer commented 8 years ago

Many thanks @YokiToki , the following commit cbfeb8e7e5fdb3d217c9db8adeda01a92a4578fc should fixed your issue without using LD_PRELOAD.