|
@@ -414,6 +414,15 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
return this.timingSource.Settings.getDurationAsNoteDuration(timeInMs);
|
|
|
}
|
|
|
|
|
|
+ /** Sets the cursor and MusicSheet.SelectionStart to the target timestamp (fraction),
|
|
|
+ * but does not start playback if it was not started already.
|
|
|
+ * To get the timestamp from milliseconds, use getTimestampFromMs().
|
|
|
+ */
|
|
|
+ public setPlaybackStart(timestamp: Fraction): void {
|
|
|
+ this.musicPartManager.MusicSheet.SelectionStart = timestamp;
|
|
|
+ this.reset();
|
|
|
+ }
|
|
|
+
|
|
|
public Dispose(): void {
|
|
|
// lock(this.playbackThreadSyncObject) {
|
|
|
this.listeners = [];
|