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

Fix: Delay timings #4

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

Conversation

vHeemstra
Copy link

  • Consistent setting of delay.
    • Less than ctx.currentTime: assume relative delay, so add ctx.currentTime for absolute timed instructions.
    • Else: assume absolute timing, so use as-is.
    • Note: When a stream buffer is used, the delay is set using a setTimeout() with delay as number of seconds. In case of absolute delay use, this would not be correct. So maybe never allow absolute delay timings?
  • Removed inconsistent returns.
  • Some additional cleanup/refactoring.

* Consistent setting of delay.
   - Less than `ctx.currentTime`: assume relative delay, so add `ctx.currentTime` for absolute timed instructions.
   - Else: assume absolute timing, so use as-is.
   - **_Note:_** When a stream buffer is used, the delay is set using a `setTimeout()` with `delay` as number of seconds. In case of absolute delay use, this would not be correct. So maybe never allow absolute delay timings?
* Removed inconsistent returns.
* Some additional cleanup/refactoring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant