Open ryanmiyakawa opened 2 years ago
Hi. We also observed this and had to build in some guard conditions to stop events at 0:0 triggering when setting transport positions whilst playing. From recollection, I think if you set a position ahead of the current position then it does not rewind, but if you set a position before the current position, it appears to perform a rapid stop (which appears to be a async operation), followed by the repositioning...
Describe the bug
When Transport looping is enabled and a loop region is redefined (i.e., defined once, transport plays and stops, then loop region is redefined), the transport subsequently starts from zero even if it is set to a non-zero value.
To Reproduce
Here is a fiddle demonstrating the issue: https://jsfiddle.net/3srjLto2/3/
Steps to reproduce:
Transport position plays from 0 rather than the specified time.
Expected behavior Transport should play from its current position without being reset to zero.
What I've tried I can only get this to happen after playing and stopping the Transport at least once.
Oddly enough, in subsequent attempts (setting position and starting from that position), the Transport will sometimes play from the set position, and sometimes play from 0 (about 60/40, 60% of the time from the correct position). However it always seems to fail in the case described by the fiddle above.
Another note is that you can set the transport position after it starts and it will still reset to 0, as seen here: https://jsfiddle.net/0Ly7gxqa/5/