瀏覽代碼

refactor, comment

sschmidTU 3 年之前
父節點
當前提交
fdf6f499c0
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/MusicalScore/Playback/VoicePlaybackData.ts

+ 2 - 1
src/MusicalScore/Playback/VoicePlaybackData.ts

@@ -84,6 +84,7 @@ export class VoicePlaybackData {
         }
 
         // TODO if playback is paused and the cursor set to the last note in Beethoven - Geliebte, there are 5 playback entries.
+        //   this is fixed below in the continue statements, but ideally we'd filter them out beforehand.
         for (let i: number = this.playbackIndex; i < this.playbackEntries.length; i++) {
             const entry: { enrolledTimestamp: Fraction, playbackEntry: PlaybackEntry } = this.playbackEntries[i];
 
@@ -94,7 +95,7 @@ export class VoicePlaybackData {
             }
             const maxEntryTimestamp: Fraction = entry.enrolledTimestamp.clone();
             maxEntryTimestamp.Add(entry.playbackEntry.Notes[0].Length);
-            if (entry.enrolledTimestamp.RealValue < enrolledTimestamp.RealValue) {
+            if (entry.enrolledTimestamp.lt(enrolledTimestamp)) {
                 if (!this.rules.PlayAlreadyStartedNotesFromCursorPosition) {
                     if (entry.enrolledTimestamp.RealValue / enrolledTimestamp.RealValue < 0.99) {
                         continue; // don't play notes that started before current cursor position