W3C home > Mailing lists > Public > public-audio@w3.org > April to June 2016

Re: Comments on AudioWorklet examples

From: Joe Berkovitz <joe@noteflight.com>
Date: Sun, 29 May 2016 10:57:50 -0400
Message-ID: <CA+ojG-a6HvgkZJ6geW3z+it0okqFHO+5Kx13XDG2A7HJcBKKng@mail.gmail.com>
To: Hongchan Choi <hongchan@google.com>
Cc: Audio Working Group <public-audio@w3.org>
Hi Group,

I've appended a new example to
https://github.com/WebAudio/web-audio-api/wiki/AudioWorklet-Examples that
is based on the old VU Meter example in the spec. This explicates some of
the issues with cross-thread communication like the old one (although I
left out some of the details to make it simpler, like clipping).

A couple more questions came up as I did this:

- What is the best way to package JS definitions that can be used in both
threads (like constants for default values)? I forget, can Worklet scripts
themselves import scripts? Hope so!

- We appear to be providing AudioContextInfo to an AudioWorkletProcessor
both at construction time and in the process() method. Is this necessary?
What if one needs to refer to some contextual information in, say, an
onmessage() call? (This actually comes up in the example, which wants to
use the sample rate to do some units conversion.)

.            .       .    .  . ...Joe
Received on Sunday, 29 May 2016 14:58:18 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 29 May 2016 14:58:19 UTC