Skip to content

Commit

Permalink
Fixing ziffers default sync
Browse files Browse the repository at this point in the history
  • Loading branch information
amiika committed Dec 18, 2023
1 parent 331ddab commit e557e55
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/classes/ZPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,7 @@ export class Player extends AbstractEvent {
}

sync(value: string | Function, manualSync: boolean = true) {

if(typeof value === "string") {
if(typeof value === "string" && manualSync) {
if(manualSync) {
const cueTime = this.app.api.cueTimes[value];
if(cueTime) {
Expand All @@ -420,11 +419,11 @@ export class Player extends AbstractEvent {
}
return this;
}

if (this.atTheBeginning() && this.notStarted()) {
const origin = this.app.clock.pulses_since_origin;
if (origin > 0) {
const syncPattern = this.app.api.patternCache.get(value.name) as Player;
const syncName = typeof value === "function" ? value.name : value;
const syncPattern = this.app.api.patternCache.get(syncName) as Player;
if (syncPattern) {
const syncPatternDuration = syncPattern.ziffers.duration;
const syncPatternStart = syncPattern.startCallTime;
Expand Down

0 comments on commit e557e55

Please sign in to comment.