Browse Source

PlaybackManager: add getSheetDurationInMs() method

sschmid 3 years ago
parent
commit
90166c4c51
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/Playback/PlaybackManager.ts

+ 5 - 0
src/Playback/PlaybackManager.ts

@@ -1253,6 +1253,11 @@ export class PlaybackManager implements IPlaybackParametersListener {
         }
     }
 
+    /** Returns the duration of the piece in ms. Including repeats. */
+    public getSheetDurationInMs(): number {
+        return this.timingSource.getDurationInMs(this.musicPartManager.MusicSheet.SheetEndTimestamp);
+    }
+
         //private class MidiChannelInfo
         //{
         //    public List<IInstrument> subscribers = new List<IInstrument>();