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

[Web MIDI API] send() timestamp

From: Marcos Caceres <marcos@marcosc.com>
Date: Fri, 14 Dec 2012 19:24:05 +0000
To: public-audio@w3.org
Message-ID: <4F3B6CB166534112AA79E8E460C092CF@marcosc.com>
I'm a bit confused… why does the API require a timestamp relative to some time (i.e., performance.now())? For example:  

output.send(data, performance.now() + time);  

It seems to me that it would be better to just let the second argument be a delay (as a high resolution timestamp):

//wait a few millis
output.send(data, millis);  

The problem is that timestamps in the past always resolve to 0 (i.e., play now!), so seems kinda pointless to rely on a timestamp.  What am I missing?  

Marcos Caceres
Received on Friday, 14 December 2012 19:24:35 UTC

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