lichen-community-systems / Flocking

Flocking - Creative audio synthesis for the Web
GNU General Public License v2.0
695 stars 60 forks source link

Flocking doesn't output audio on Node.js on Windows 10 #179

Closed colinbdclark closed 8 years ago

colinbdclark commented 8 years ago

No audio is output when running Flocking in Node.js on Windows 10 (and possibly other versions, I haven't tested). No errors are thrown; there's just no sound.

With some debugging, this is due to a bug in that was recently fixed upstream in node-speaker, the library used by Flocking to output audio. This change, in turn, caused Flocking to regress on Windows, since it appears that node-speaker now does not support samples in 32-bit floating point format. This latter issue is fixed in a pending pull request to node-speaker that apparently hasn't been reviewed yet.

After this, we'll still need to update our low-latency hack branch of node-speaker until they provide some means of surfacing mpg123 buffer sizes to JavaScript. There's also an unfinished pull request to node-speaker for this, but it's been dormant for a while.

The bottom line: we need a more reliable audio backend in Node.js, preferably one based on portaudio.

colinbdclark commented 8 years ago

Fixed upstream in my fork of node-speaker by merging in the latest master and the above-mentioned pull request.