- From: Chris Rogers <crogers@google.com>
- Date: Thu, 17 Jan 2013 11:11:56 -0800
- To: robert@ocallahan.org
- Cc: public-audio@w3.org
- Message-ID: <CA+EzO0=TKXKmOW_XLog7VCGn=s8DGeHm8vMjMKYHfmBtuSoRww@mail.gmail.com>
On Wed, Jan 16, 2013 at 6:21 PM, Robert O'Callahan <robert@ocallahan.org>wrote: > ChannelMergerNode seems a bit fragile if the number of channels on an > input is changing dynamically. The way it's defined, if the number of > channels on input 0 changes dynamically, then the channels of inputs > 0 > move up or down in the channel layout. The same thing would happen if a > node is connected or disconnected to input 0 while other nodes are > connected to inputs > 0. In fact, the spec doesn't say what happens if > input 0 has nothing connected but inputs > 0 do. > It's true that the behavior is tricky if the input(s) are changing dynamically, so the developer would have to be careful to account for it. But, I believe it's well-defined. I think in the vast majority of useful cases, the inputs would be static in their channels and thus would present a stable output. To answer your question about what happens if input 0 has nothing connected to it, it just doesn't influence the output at all and is skipped. > > It seems ChannelMergerNode would also interact poorly with the > auto-removal of nodes from the graph (which is still itself a big problem > ... I posted about that a while ago). > > I think it would be much simpler and more reliable, and easier to > implement, if the number of channels taken from each input by > ChannelMergerNode was constant for the lifetime of the node. For example, > we could pass this as an additional optional parameter to > createChannelMerger, defaulting to 1. > This node is one of the simplest we have in WebKit, and the implementation is about 1.5 pages of code. I'm happy to share some of the approaches we've taken. > > Rob > -- > Jesus called them together and said, “You know that the rulers of the > Gentiles lord it over them, and their high officials exercise authority > over them. Not so with you. Instead, whoever wants to become great among > you must be your servant, and whoever wants to be first must be your > slave — just as the Son of Man did not come to be served, but to serve, > and to give his life as a ransom for many.” [Matthew 20:25-28] >
Received on Thursday, 17 January 2013 19:12:26 UTC