@dawcore/components 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3605,8 +3605,12 @@ var DawEditorElement = class extends LitElement8 {
3605
3605
  const playhead = this._getPlayhead();
3606
3606
  if (!playhead || !this._engine) return;
3607
3607
  const engine = this._engine;
3608
+ const ctx = this.audioContext;
3608
3609
  playhead.startAnimation(
3609
- () => engine.getCurrentTime(),
3610
+ () => {
3611
+ const latency = "outputLatency" in ctx ? ctx.outputLatency : 0;
3612
+ return Math.max(0, engine.getCurrentTime() - latency);
3613
+ },
3610
3614
  this.effectiveSampleRate,
3611
3615
  this.samplesPerPixel
3612
3616
  );