W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

[web-audio-api] AudioNode.disconnect() needs to be able to disconnect only one connection (#6)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:27:32 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/6@github.com>
> Originally reported on W3C Bugzilla [ISSUE-17793](https://www.w3.org/Bugs/Public/show_bug.cgi?id=17793) Tue, 17 Jul 2012 18:30:24 GMT
> Reported by Chris Wilson
> Assigned to 

(Summary of email conversation in list)

There is currently no way to disconnect node A's connection to node B without disconnecting all connections from node A to other nodes.  This makes it impossible to disconnect node B from the graph without potential side effects, as you have to:

- call disconnect() on node A (which disconnects all its outputs)
- reconnect every connection that node A used to have, EXCEPT the connection to node B.

Not only is this cumbersome, it will be problematic in the future when we solve the related issue of unconnected streams - which is currently exhibiting incorrect behavior in Chrome (it pauses the audio stream), but is underspecified in the spec today.  (filing separate bug).  Disconnecting then reconnecting would have to have no side effects.  (It works okay today, but not ideal - can click.)

Recommended solution:
- there should be a way to remove a single connection (by supplying the destination node to be disconnected, since there can only be one connection to a given destination node [tested]).

E.g.: the IDL for disconnect should read:

        void disconnect(in [Optional] AudioNode destination, in [Optional] unsigned long output = 0)

this lets us keep most compatibility - node.disconnect() will still remove all connections.

Reply to this email directly or view it on GitHub:
Received on Wednesday, 11 September 2013 14:27:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:23 UTC