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

Re: Reflections on writing a sequencer

From: Anthony Bowyer-Lowe <anthony@lowbroweye.com>
Date: Wed, 25 Jul 2012 09:05:21 +0100
Message-ID: <CAMCSOPV5CKFvZb9D7NTV7hcmsdzXVAYohrrJyDsNp2xEg_SMKg@mail.gmail.com>
To: Audio Working Group <public-audio@w3.org>
The sequencer pre-roll paradigm as described by Joe is what I've been using
very happily.

Also, window.onblur/onfocus can be used to handle situations where the
requestAnimationFrame tick callback is inhibited due to your sequencer tab
not being visible in the foreground: by pausing the sequencer playback,
radically increasing it's pre-roll look-ahead duration and using a
throttled setTimeout instead, etc as needed.


On 24 July 2012 20:11, Jonathan Baudanza <jon@jonb.org> wrote:

> On Tue, Jul 24, 2012 at 3:03 PM, Adam Goode <agoode@google.com> wrote:
>> Aha, thanks for the tips. I didn't find anything in the w3c bugzilla
>> regarding callbackAtTime, but that sounds like it's perfect.
>> I'll try Joseph's technique for now.
> Chrome will throttle setTimeout callbacks to once a second if the browser
> frame isn't visible. There's nothing you can do about it, but it's good to
> know so you don't spent a lot of time debugging.
Received on Wednesday, 25 July 2012 08:06:19 UTC

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