-
Notifications
You must be signed in to change notification settings - Fork 0
N-API #10
Conversation
This could be merged after NAPI reaches a more mature and stable state in Node. Currently master and NAPI can be used as a test comparison to assist NAPI with development too. Keep up the good work! |
test.js
Outdated
) | ||
}) | ||
|
||
test('opens mpg123', function (t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason the old test never checked if the binding could open, was because the test was designed for Travis during audio-speaker
tests. Travis doesn't have the appropriate environment to open an instance of mpg123. If you could test this, try find a way around it or make another test for Travis (add it to the commands Travis will run). That would be great!
Not bothered with Travis atm cuz I dont even have teste written. Also |
Just for when you get around to it. |
Hey @jamen what's the status of the issue? How do you think is the NAPI strong enough to go on with that instead of nan? |
Hey @dfcreative. I pushed some changes and I'm gonna keep hacking at this branch. Replied to your email for more details. About the stability of N-API. I think it is stable enough. It is no longer hidden behind a flag, but the API did change a bit since I last used it (nothing really complicated). One downside is that it outputs this:
Maybe there is a flag we can compile with in |
I'll be busy next few weeks. Here are resources I've used if anyone is interested in continuing this:
Some extra thoughts:
|
N-API is no longer experimental in Node v10 |
A work in progress branch of N-API refactor
mpg123.create
mpg123.open
mpg123.close
mpg123.write
mpg123.flush
mpg123.<S*,U*,F*>
formatsnapi_*
status checksIt includes some breaking API changes that take a more simple approach. e.g.
finis(success)
callbacks, we just return booleans or objects.napi_create_external
instead of the oldpointer_wrapper.h
mpg123.<S8,S16,S32,U8,U16,U32,F32,F64>
, for signed, unsigned, and floatsCurrently working on
mpg123.write
andmpg123.flush
. Will be tricky because I have to learn their async system! I am not that experienced with C++ so we will see how this goes, might take a bit longer. Help wanted.