Skip to content

Commit 5e03527

Browse files
committed
Deploying to gh-pages from @ f827e50 🚀
1 parent c5ea3fc commit 5e03527

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

samples/lib/web_audio_controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ export class WebAudioController {
7777
// hardware buffering, etc. This starts out negative, because it takes some
7878
// time to buffer, and crosses zero as the first audio sample is produced
7979
// by the audio output device.
80-
let totalOutputLatency =
81-
this.audioContext.outputLatency + this.audioContext.baseLatency;
80+
let outputLatency = this.audioContext.outputLatency ? this.audioContext.outputLatency : 0;
81+
let totalOutputLatency = outputLatency + this.audioContext.baseLatency;
8282

8383
return Math.max(this.audioContext.currentTime - totalOutputLatency, 0.0);
8484
}

0 commit comments

Comments
 (0)