Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

clarify listener registration #48

Open
shanemikel opened this issue Oct 19, 2015 · 0 comments
Open

clarify listener registration #48

shanemikel opened this issue Oct 19, 2015 · 0 comments

Comments

@shanemikel
Copy link

Figuring out how to properly register and unregister listeners that use the .listen method is unclear to me. If I create a spectrum object for instance:

var saw = T("pink", {mul:0.15}).play();

var fft = T("spectrum", {size:512, interval:100}).on("data", function() {
  fft.plot({target:canvas});
}).listen(saw);

Is this removable through calling fft.removeAllListeners(), or saw.removeAllListeners(), or is this completely separate? If so, could somebody add documentation for the listen and unlisten methods (or point me to it if I have missed it).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant