[web-audio-api] Return destination from AudioNode::connect() (#258)

The following issue was raised by the W3C TAG as part of their [review of the Web Audio API](https://github.com/w3ctag/spec-reviews/blob/master/2013/07/WebAudio.md)


Why doesn't `AudioNode::connect()` return the passed `AudioNode destination`? It would enable a much terser chained style in some cases. Janessa Det provides the example of:

  ```js
  oneShotSound.connect(lowpass);
  lowpass.connect(panner);
  panner.connect(gainNode2);
  gainNode2.connect(compressor);
  compressor.connect(destination);
  ```

  becoming:

  ```js
  oneShotSound
      .connect(lowpass)
      .connect(panner)
      .connect(gainNode2)
      .connect(compressor)
      .connect(destination);
  ```


---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/258

Received on Thursday, 17 October 2013 12:35:28 UTC