lichen-community-systems / Flocking

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

Environment buffers are not correctly saved to the file system in Node.js #162

Closed colinbdclark closed 8 years ago

colinbdclark commented 8 years ago

Currently, if you try to save a buffer from the environment by calling saveBuffer(), it will produce a (very small) invalid audio file.

This is due to the fact that Node.js doesn't support writing raw ArrayBuffers to the file system. flock.audio.encode.wav, however, produces an ArrayBuffer as its output, and we don't do anything to wrap it up as a Node.js Buffer object prior to writing it.