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

AudioParam namespace in AudioWorkerNode

From: Joseph Berkovitz <joe@noteflight.com>
Date: Mon, 25 Aug 2014 17:16:31 -0400
Cc: "public-audio@w3.org" <public-audio@w3.org>
Message-Id: <7C7D41CD-E29C-4274-8C5B-1728DD5DCF13@noteflight.com>
To: Chris Wilson <cwilso@google.com>
Chris,

One further piece of feedback, breaking out into a separate thread here.

To keep the parameter namespace clean, I think the dynamic AudioParams should be bound to properties of a separate “params” object hanging off of AudioProcessingEvent, rather than properties of the event itself.

1. This prevents any possible collision between parameter names and other event properties, of which there are many (and perhaps more in the future).

2. It also makes it much easier for application code to enumerate the AudioParams associated with a given event instance; no need to skip over the “builtin” properties of an Event as one iterates.

So:

interface AudioProcessingEvent : Event
 {
    readonly    attribute double      playbackTime;
    readonly    attribute AudioBuffer inputBuffer;
    readonly    attribute AudioBuffer outputBuffer;
    readonly    attribute object params;        // dynamic parameters hang off this object
};

Thoughts?

…Joe
Received on Monday, 25 August 2014 21:16:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:14 UTC