We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5ea3fc commit 5e03527Copy full SHA for 5e03527
1 file changed
samples/lib/web_audio_controller.js
@@ -77,8 +77,8 @@ export class WebAudioController {
77
// hardware buffering, etc. This starts out negative, because it takes some
78
// time to buffer, and crosses zero as the first audio sample is produced
79
// by the audio output device.
80
- let totalOutputLatency =
81
- this.audioContext.outputLatency + this.audioContext.baseLatency;
+ let outputLatency = this.audioContext.outputLatency ? this.audioContext.outputLatency : 0;
+ let totalOutputLatency = outputLatency + this.audioContext.baseLatency;
82
83
return Math.max(this.audioContext.currentTime - totalOutputLatency, 0.0);
84
}
0 commit comments