You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable toggling of repeat as late as possible, we speculatively schedule clicks past the end of the track - the beats that would play if repeat is enabled - and after the last click in the track we check the repeat state and either continue or stop the audio context.
If the audio of the last beat is long enough that it lasts past the end of the track (i.e., the click is a 0.1s sample played 0.05s before the end of the track) - or at least near enough the end the event loop doesn't make a tick before the end of the track - and repeat is disabled, the speculatively scheduled 'start over' clicks may play some audio before the audio context is stopped.
We can get around this by checking the repeat state as of the scheduling of the last beat and declining to speculatively schedule beats. So doing, the 'repeat' button will feel less responsive - there's a window where its state can be toggled before the end of a track and the effect will not be felt. It might be worth it for more perfect audio. In any case it should be made as small a window as possible.
The text was updated successfully, but these errors were encountered:
To enable toggling of repeat as late as possible, we speculatively schedule clicks past the end of the track - the beats that would play if repeat is enabled - and after the last click in the track we check the repeat state and either continue or stop the audio context.
If the audio of the last beat is long enough that it lasts past the end of the track (i.e., the click is a 0.1s sample played 0.05s before the end of the track) - or at least near enough the end the event loop doesn't make a tick before the end of the track - and repeat is disabled, the speculatively scheduled 'start over' clicks may play some audio before the audio context is stopped.
We can get around this by checking the repeat state as of the scheduling of the last beat and declining to speculatively schedule beats. So doing, the 'repeat' button will feel less responsive - there's a window where its state can be toggled before the end of a track and the effect will not be felt. It might be worth it for more perfect audio. In any case it should be made as small a window as possible.
The text was updated successfully, but these errors were encountered: