- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Mon, 26 Mar 2012 16:25:29 +1300
- To: Chris Rogers <crogers@google.com>
- Cc: olivier Thereaux <olivier.thereaux@bbc.co.uk>, public-audio@w3.org, jussi.kalliokoski@gmail.com
- Message-ID: <CAOp6jLZp2gnS4rr8iL4zCpre=nGeq+ecMOW7OANbahOizn80CQ@mail.gmail.com>
On Fri, Mar 23, 2012 at 8:44 AM, Chris Rogers <crogers@google.com> wrote: > For dealing with arbitrary parts of the graph (sub-graphs or sub-mixes) > one technique is to control the .gain parameter on an AudioGainNode which > controls the overall volume for that part of the graph. The gain/volume > transition can be made suddenly or slowly faded out at precise times. > Another technique is to simply stop scheduling any new "notes" from > playing in AudioBufferSourceNodes, and by stopping any currently playing > notes by calling the noteOff() method. Sometimes, it will be a good idea > to schedule the noteOff() to not happen immediately, but to wait for the > exact time that a loop reaches its end. > That's not pausing, just muting. > > >> It seems to me that wouldn't be satisfactory. First of all, there are no >> guarantees that explicitly pausing each input will pause them all at >> exactly the same moment, so pausing and resuming would break >> synchronization. > > > AudioBufferSourceNodes can be scheduled to happen at exact times. So > their start and end times can be given precisely and will be synchronized. > I don't think that works for other sources such as media elements. Also, you can't easily start playing an AudioBufferSourceNode in the middle of a buffer to make it start playing again at the right point. WHEN THE SOURCE IS RESUMED > When paused according to (1) > 1a. The echo/reverb is heard from old (before pausing) sounds played by > the source, layered on top of echo/reverb from the new (resumed) sounds > from the source. > > 1a is considered to be anomalous behavior in musical applications since it > abruptly re-introduces old/stale echo/reverb state into the rendered audio > stream. It can be caused by a filter (echo/reverb in this case) not having > its state reset properly at the moment of "pausing" for case (1). > 1a is clearly desired if you're pausing output of the entire application, or (per http://lists.w3.org/Archives/Public/public-audio/2012JanMar/0297.html) you're pausing part of the application. I suppose the question is whether there are interesting use-cases where the graph to be paused is not the whole graph. Rob -- “You have heard that it was said, ‘Love your neighbor and hate your enemy.’ But I tell you, love your enemies and pray for those who persecute you, that you may be children of your Father in heaven. ... If you love those who love you, what reward will you get? Are not even the tax collectors doing that? And if you greet only your own people, what are you doing more than others?" [Matthew 5:43-47]
Received on Monday, 26 March 2012 03:25:59 UTC