Skip to content

Commit

Permalink
Increases the audio buffer size to reduce crackling.
Browse files Browse the repository at this point in the history
Dampening when touch is let go was adjusted to make it independent of buffer size.
  • Loading branch information
elondaits committed May 14, 2019
1 parent e618edd commit 66c13ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
{
// blockLength Can be set to 512 for more responsiveness but
// potential crackling if CPU can't fill the buffer fast enough (latency)
blockLength : 1024,
blockLength : 2048,
blockTime : 1,
started : false,
soundOn : false,
Expand Down Expand Up @@ -796,7 +796,7 @@
if (!this.isTouched && (alwaysVoice || this.isTouchingSomewhere)) this.newTenseness += (3-this.UITenseness)*(1-this.intensity);

if (this.isTouched || alwaysVoice || this.isTouchingSomewhere) this.intensity += 0.13;
else this.intensity -= 0.05;
else this.intensity -= (AudioSystem.blockTime * 5);
this.intensity = Math.clamp(this.intensity, 0, 1);
},

Expand Down

0 comments on commit 66c13ef

Please sign in to comment.