yvesgurcan/web-midi-player

Bug: Sound overlaps when clicking on same MIDI file rapidly

Opened this issue · 0 comments

Environment

  • Version of web-midi-player: 1.3.8
  • Browser: Chrome
  • Operating system: macOS
  • Device model: iMac 2011

Bug

Describe the issue as specifically as possible.

If you trigger midiPlayer.play() multiple times very quickly, the player will start playing the same song multiple times at once and at the wrong speed.

Expected behavior

What did you expect to happen?

The song should start playing only once at the right speed and sound should not overlap.

Example/Screenshots

Please provide screenshots to help reviewers to visualize the bug and how it manifests.

Please provide the smallest code sample possible to reproduce the bug.
We recommend using CodePen, JSbin, or CodeSandbox to provide a live example of the issue.