Open dy opened 8 years ago
Thanks for the clarification. I will update with my findings shortly.
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@dy I would like to get up to speed with this and I thought if somebody could share their build script for npm run build, that would be great. As I understand it the config.h error happens after trying to reconfigure node-gyp. I would like to understand better if anybody else other than @dy has been able to reproduce the config.h. I would like to really understand deeply how each library component works and why you guys need/want it. Not in terms of audio capabilities level (as of yet) but just on a 'build' level for now. Another question I have potentially, does napi allow to switch versions without recompiling/rebuilding just to avoid the nan problem as seen on this issue? Is using napi with mpg123 instead of nan viable? Because if there's a missing win32 identifier problem (as the error states) maybe there's a wrong abi (configured for 64bit) and some value is not being read. I might be talking nonsense but I just want to gauge the surface and learn more. What are your thoughts? One thing is for sure, implementing a new cubeb cross-platform with napi will be somewhat groundbreaking. I think of all those native speed low latency audio streaming possibilities. Or maybe the new features you're after for the speaker output are different. First thing is first though. Once I cover all possibilities that may cause the error as it pertains to the gyp mgpg123 binding and the configure command, I'll move onto other things.
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
I guess there's no abi in nan.
@Elemino I didn't work much with low-level API, I was mostly concerned with consistent modules interface and optimal js code. That question is better addressed to @jamen or @connorhartley, the guys spend more time on that (thanks for that!)
As I understand it the config.h error happens after trying to reconfigure node-gyp. I would like to understand better if anybody else other than @dy has been able to reproduce the config.h.
config.h
files make Mpg123 work for different systems. They're from audio-mpg123
's source, copied from node-speaker
's source when we forked it. The comments seem to explain how it works, but I haven't read through the files personally.
I haven't reproduced this error. It might not even be relevant anymore? There is several issues and incomplete parts of the bindings, though.
I would like to really understand deeply how each library component works and why you guys need/want it. Not in terms of audio capabilities level (as of yet) but just on a 'build' level for now.
I'll talk about Mpg123's setup, Cubeb's setup, then our setups.
Visit Mpg123's website for a lot of information. Mpg123 is hosted on SVN, so its mangled into git projects. audiojs/mpg123-mirror
is @connorhartley's port to git and node-speaker
includes mpg123 as a directory. See also API documentation for libmpg123 and libout123.
Mpg123 uses automake for its build, but it has to be reworked in node-gyp for our binding. Luckily node-speaker already did this (found in our fork here). If you feel motivated to rework the build of the binding, I'm open to ideas. For example, in Cubeb I've reached a simpler solution without node-gyp.
Clone Cubeb's repository and build its docs for information (I don't know any online sources unfortunately). Cubeb uses CMake for its build, so I've used cmake-js in the binding, which makes the entire thing much simpler.
Going forward with either one, it should use prebuild eventually, where instead of compiling source code when its installed, you install the compiled binary for your system.
Not sure what else to add here.
Another question I have potentially, does napi allow to switch versions without recompiling/rebuilding just to avoid the nan problem as seen on this issue?
You should recompile when switching Node versions. I've gotten errors about mismatched ABI versions several times. Not sure if it absolutely necessary, though.
The original issue could be related this. But, it would've been a local fix, and there is other issues with the bindings.
Is using napi with mpg123 instead of nan viable? Because if there's a missing win32 identifier problem (as the error states) maybe there's a wrong abi (configured for 64bit) and some value is not being read. I might be talking nonsense but I just want to gauge the surface and learn more. What are your thoughts?
It is! We have an incomplete branch for this, which you are welcome to continue, or start your own.
I would rank all the options we have like this:
Any of these are acceptable if its more stable/complete than what we have now. Just points to be made about which are better.
One thing is for sure, implementing a new cubeb cross-platform with napi will be somewhat groundbreaking. I think of all those native speed low latency audio streaming possibilities. Or maybe the new features you're after for the speaker output are different. First thing is first though. Once I cover all possibilities that may cause the error as it pertains to the gyp mgpg123 binding and the configure command, I'll move onto other things.
Definitely!
I want to stress the point: Mpg123 and Cubeb are alternatives to doing the same thing. Cubeb arguably does it better. Mpg123 is already began and undergone testing. But we need to choose one of them to use in audio-speaker.
I don't have complete insight in how Web Audio API, Mpg123, and Cubeb stack up against each other with their performance and features, but in my opinion, Web Audio API looks pretty robust as it is, we should use it where we can, and Cubeb where we can't.
First thing is first though. Once I cover all possibilities that may cause the error as it pertains to the gyp mgpg123 binding and the configure command, I'll move onto other things.
If you want to champion both of bindings, keep in mind we can only use one for audio-speaker
.
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
This clarifies so much @jamen thank you. Will touch base again shortly.
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Okay, I've been absent for a while. I will submit WIP PR Monday evening to start documenting my progress. I hope this will add some value. Thanks.
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Okay, I'm almost ready to submit the first WIP PR. I apologize it took so long. I had to learn C++ from scratch and had some family issues along the way. Quick question: Should I start with a new branch or submit a fork? Thank you all for your patience.
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@Elemino No rush its all good. You can submit a PR from a fork.
@elemino Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Hello there, it's been a while ever since I've posted anything on here. I have some time to put into this project, so I thought I'd let you know. I'll see if I can submit something soon. Please let me know if there are any changes in the ecosystem that you would like me to know about. p.s: If this bounty could be revived, that would be great! It got expired at some point but gitcoin seemingly allows to submit work? Thanks a lot and I hope you all are doing good.
https://github.com/denoland/deno/pull/2825 Does this qualify as a solution?
Hm? deno supports sound?
npm install audio-speaker
givesThis happens only when local version of node-gyp is used. Probably some config needed or something. Because global node-gyp rebuilds speaker just fine.