Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop keeps playing after stopped, if execution was suspended in debugger for a while #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexeyv
Copy link

@alexeyv alexeyv commented Nov 28, 2017

To reproduce the problem:

  1. Start a short sound with loop: true
  2. Put a breakpoint on sound.stop call (or anywhere else, really)
  3. Trigger the breakpoint
  4. Wait for a bit, then resume execution.

Expected: loop stops
Actual: loop keeps merrily looping after the sound.stop() call. An hour-long dive through the app and the library to figure out what can possible be restarting the loop ensues. Actually, nothing does, it's only the interplay between this if and having JavaScript engine paused for a while when the loop was playing.

I'm not sure I completely understand the subtleties of (this.time_offset >= this.end || this.end - this.time_offset < 0.015) condition, so maybe this PR breaks some other case I'm not thinking of. But it surely solves the described problem. :)

Please have a close look.

…g after it's stopped, if at some point in time JavaScript execution was interrupted by a debugger breakpoint WHILE the loop has played to the end of a sound file
@IonDen IonDen self-assigned this Nov 28, 2017
@aveeday aveeday mentioned this pull request Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants