Skip to content

Commit

Permalink
No sound output after expected end of samples
Browse files Browse the repository at this point in the history
  • Loading branch information
astoniab committed Jun 11, 2023
1 parent af413b5 commit 6a692e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions funstim.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ onmessage = e => {
amp = (amp + ampFilter * (filterLength - 1)) / filterLength;
}

if (sample >= totalSamples) {
amp = 0;
}

ampFilter = amp;
let lVol = getVolume(pos, volumeMap.left);
let rVol = getVolume(pos, volumeMap.right);
Expand Down

0 comments on commit 6a692e0

Please sign in to comment.