Parcourir la source

AbstractTimingSource: setTimeAndBpm: make bpm optional

sschmid il y a 3 ans
Parent
commit
d5b7142f00
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/Playback/TimingSources/AbstractTimingSource.ts

+ 2 - 2
src/Playback/TimingSources/AbstractTimingSource.ts

@@ -12,9 +12,9 @@ export class AbstractTimingSource implements ITimingSource {
         }
         this.reset();
     }
-    public setTimeAndBpm(timestamp: Fraction, bpm: number): void {
+    public setTimeAndBpm(timestamp: Fraction, bpm?: number): void {
         this.anchorTimestamp = Fraction.createFromFraction(timestamp);
-        if (this.Settings !== undefined) {
+        if (this.Settings !== undefined && bpm) {
             this.Settings.BeatsPerMinute = bpm;
         }
         this.reset();