W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

[Web MIDI API] send(…, DOMHighResTimeStamp? timestamp)

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Mon, 24 Dec 2012 01:30:32 +0000
To: "public-audio@w3.org" <public-audio@w3.org>
Message-ID: <9613DAEDAFA84A65AFC17C9795230166@gmail.com>
For send()'s second argument, the spec says that it takes DOMHighResTimeStamp… however, "DOMHighResTimeStamp" isn't a "real data type" (in that there is no way to actually force a type check on it in some meaningful way AFAICT).  Hence, it's actually just a double that is relative to some start time. This is confirmed in [1]:

typedef double DOMHighResTimeStamp;

To avoid confusion during implementation, I would suggest changing the value data type of the second argument of the send() method to a double.   

optional double timestamp;

Also, why is the second argument nullable when it's already optional?  

Note that the current text in the spec is redundant because WebIDL already handles the type checking. Please remove " or if timestamp is passed but is not a valid DOMHighResTimeStamp, throw a TYPE_ERROR exception".  

[1] http://www.w3.org/TR/2012/REC-hr-time-20121217/#domhighrestimestamp

Marcos Caceres
Received on Monday, 24 December 2012 01:31:02 UTC

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