Prevent horrible screeching when BEL is spammed

cpsdqs/unified-input
cpsdqs 7 years ago
parent b3608272a0
commit a7a2daee11
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 4
      jssrc/term_screen.js

@ -888,6 +888,10 @@ class TermScreen {
const audioCtx = this.audioCtx;
if (!audioCtx) return;
// prevent screeching
if (this._lastBeep && this._lastBeep > Date.now() - 50) return;
this._lastBeep = Date.now();
let osc, gain;
// main beep

Loading…
Cancel
Save