getOutputTimestamp abstract method

AudioTimestamp getOutputTimestamp()

The getOutputTimestamp() method of the AudioContext returns a new AudioTimestamp object containing two audio timestamp values relating to the current audio context.

The two values are as follows:

  • AudioTimestamp.contextTime: The time of the sample frame currently being rendered by the audio output device (i.e., output audio stream position), in the same units and origin as the context's BaseAudioContext.currentTime. Basically, this is the time after the audio context was first created.
  • AudioTimestamp.performanceTime: An estimation of the moment when the sample frame corresponding to the stored contextTime value was rendered by the audio output device, in the same units and origin as performance.now. This is the time after the document containing the audio context was first rendered.

Implementation

AudioTimestamp getOutputTimestamp();