|
@@ -576,7 +576,10 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
// console.log("TS ms: " + this.timingSource.getCurrentTimeInMs());
|
|
|
// console.log("TS ts: " + this.currentTimestamp);
|
|
|
endHasBeenReached = this.cursorIterator.EndReached;
|
|
|
- if (!this.cursorIterator.CurrentMeasure.WasRendered) {
|
|
|
+ // TODO cursorIterator.CurrentMeasure can be undefined (at the end of the piece?)
|
|
|
+ const currentMeasure: SourceMeasure = this.cursorIterator.CurrentMeasure;
|
|
|
+ if (currentMeasure && !currentMeasure.WasRendered && !currentMeasure.isReducedToMultiRest) {
|
|
|
+ // stop if current measure is not rendered, but not if it's part of a multi-measure rest
|
|
|
endHasBeenReached = true;
|
|
|
}
|
|
|
|