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

feat: non-infinite silenceSpeed for "experimental" (cloning) algorithm #75

Open
WofWca opened this issue Jun 18, 2022 · 0 comments
Open

Comments

@WofWca
Copy link
Owner

WofWca commented Jun 18, 2022

Right now we're mostly performing seeks for this algorithm:

But also sometimes we speed up, this can be taken as a basis:

if (farEnoughToSpeedUp) {
// TODO what if `realTimeLeftUntilDestinationAtSilenceSpeed` is pretty big? Need to cancel this if
// the user seeks to a sounded place.
// May be other caveats.
this._setSpeedAndLog(SpeedName.SILENCE);

My idea: we can make it work roughly the same way as seeking works right now. It's inefficient, but should work:
On every 'timeupdate' event, check if we're on a silent or on a sounded part, set speed accordingly, check when the current silence (loudness) period ends and setTimeout to switch speed at that time.

We also need to think how it's gonna be on the UI. Do we just set speed to infinite when the "silence speed" slider is at max value? Or do we make a separate checkbox?

Related #48

@WofWca WofWca changed the title feat: non-infinite silenceSpeed for "experimental" (cloning) algorithm. feat: non-infinite silenceSpeed for "experimental" (cloning) algorithm Jun 18, 2022
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

1 participant