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

any plans to expand constructor functionality?

From: Matt Diamond <mdiamond@jhu.edu>
Date: Sun, 1 Jul 2012 17:30:05 -0700
Message-ID: <CADdpXtu7RA5gcUSSvoT3vYyNjb=KrgjHh=fBrUwCVs7JgJU3Uw@mail.gmail.com>
To: public-audio@w3.org
For example, it would be nice to have the ability to instantiate a new
Oscillator with a specified type... something along the lines of:

var sine = context.createOscillator({ type: Oscillator.SINE });

instead of having to do this:

var sine = context.createOscillator();
sine.type = sine.SINE;

Of course, this introduces the necessity of exposing the Oscillator class
to the user, so maybe this isn't the right way to go about it. Still, the
ability to set parameters on instantiation would make the resulting code
look a bit cleaner.

Matt Diamond
Received on Monday, 2 July 2012 13:22:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 July 2012 13:23:00 GMT