Functional branch stack overflow
jamen opened this issue · comments
Hi.
I've created a branch called functional
where I've attempted to convert this.
Usage looks like this:
var oscillate = oscillator(options)
var speaker = speaker(options)
oscillate(speaker)
// or more simply:
oscillator({ frequency: 150 })(speaker())
However, there is a problem in the stream.js
and pull.js
wrappers where I get a stack overflow. Which is probably because I designed oscillator with recursion.
I'm unsure how i should convert to loops in this scenario. Any ideas? cc @dfcreative @connorhartley
I can add comments if that would help. Branch not finished yet.
EDIT: that has been done.
I would like to be able to use this as a test in all the audio-speaker
packages, but currently waiting on this functional implementation and pull stream implementation. 😄
@connorhartley we can safely make tests with it now. Took 10 days...