bengl / node-webaudio

Web Audio API for Node.js
2 stars 0 forks source link

Status of project + considerations #1

Open mcanthony opened 9 years ago

mcanthony commented 9 years ago

I was wondering if you considered extracting the Web Audio API implementation from chromium in order to effectively transplant the entire API (as implemented) into NodeJS. This would be considerably more work up-front but surely less work than it would be trying to re-implement it properly and completely without there being any nuance bugs and inconcistancies. Plus the API already has a V8 interface, so it would play well with Node which uses V8.

There is a project which has already extracted WebAudio from chromium: https://github.com/meshula/LabSound

This project would have already done most of the hard work, leaving only some patchwork-bindings for the frills that are attached to other parts of chromium, which may possibly involve simply removing those interfaces as they are likely irrelevant to Node or would require some other part of Chromium (WebRTC for instance).

I am interested in a NodeJS implementation that supports the full WebAudio API for my OpenDAWN project so that the Node instance can be used as a server-side rendering node (pun intended) allowing one to create an audio DSP cloud. OpenDAWN will use NW.JS for the user-facing implementation, which may do just fine running as a server as well, it just seems weird. Kinda like running a browser engine as a server (with Node)...

bengl commented 9 years ago

Admittedly, my interests have gone elsewhere and I've abandoned this project. I don't really have the capacity to keep this moving forward, but if you'd like to take a stab at it, let me know and I'll add you as a collaborator.

To be honest, I think using NW.js or Electron might be the correct approach when wanting to use pretty much any web platform API with node. That way you have a well-tested implementation of the API, and it isn't faked, or ripped out of its intended environment.

If I remember correctly, both NW.js and Electron can be run in Xvfb, so you should be able to run them on a Linux server without much issue.