@dawcore/components 0.0.21 → 0.0.22

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
@@ -6050,12 +6050,7 @@ var DawEditorElement = class extends LitElement11 {
6050
6050
  const playhead = this._getPlayhead();
6051
6051
  if (!playhead || !this._engine) return;
6052
6052
  const engine = this._engine;
6053
- const ctx = this.audioContext;
6054
- const audibleTime = () => {
6055
- const outputLatency = "outputLatency" in ctx ? ctx.outputLatency : 0;
6056
- const t = engine.getCurrentTime() - outputLatency - engine.lookAhead;
6057
- return Number.isFinite(t) ? Math.max(0, t) : 0;
6058
- };
6053
+ const audibleTime = () => engine.getAudibleTime();
6059
6054
  if (this.scaleMode === "beats") {
6060
6055
  const secondsToTicksFn = (s) => this._secondsToTicks(s);
6061
6056
  playhead.startBeatsAnimationWithMap(audibleTime, secondsToTicksFn, this.ticksPerPixel);
@@ -6066,10 +6061,7 @@ var DawEditorElement = class extends LitElement11 {
6066
6061
  _stopPlayhead() {
6067
6062
  const playhead = this._getPlayhead();
6068
6063
  if (!playhead) return;
6069
- const ctx = this.audioContext;
6070
- const outputLatency = "outputLatency" in ctx ? ctx.outputLatency : 0;
6071
- const lookAhead = this._engine?.lookAhead ?? 0;
6072
- const t = this._currentTime - outputLatency - lookAhead;
6064
+ const t = this._currentTime;
6073
6065
  const visualTime = Number.isFinite(t) ? Math.max(0, t) : 0;
6074
6066
  if (this.scaleMode === "beats") {
6075
6067
  playhead.stopBeatsAnimationWithMap(