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

Pause, then play, then seek (Transport.seconds = ...) results in long delay #706

Closed
bduffany opened this issue Aug 2, 2020 · 3 comments
Closed

Comments

@bduffany
Copy link

bduffany commented Aug 2, 2020

Repro: https://jsfiddle.net/b9Ldj0mu/16/

  1. Press play
  2. Wait a second, then press pause
  3. Press play again
  4. Click the audio player to seek to the given time
  5. Observe the long delay before the transport actually seeks to the given position

Tested on Chrome 83 / Linux (Ubuntu 20.04)

@bduffany
Copy link
Author

bduffany commented Aug 3, 2020

A workaround (jsfiddle) is to change the implementation of pause to

const sec = Tone.Transport.seconds;
Tone.Transport.stop();
Tone.Transport.seconds = sec;

but I'm not sure if this has any downsides? Is there any difference between pause and stop?

@tambien
Copy link
Contributor

tambien commented Sep 24, 2020

thanks for the test case. I think this should be fixed as soon this commit builds

@bduffany
Copy link
Author

bduffany commented Sep 25, 2020

I can no longer reproduce the problem in the JSFiddle so I think it's fixed as well. Huge thanks for the fix, and for the work you've been doing on this library!

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

No branches or pull requests

2 participants