@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.js +2 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -6097,12 +6097,7 @@ var DawEditorElement = class extends import_lit15.LitElement {
|
|
|
6097
6097
|
const playhead = this._getPlayhead();
|
|
6098
6098
|
if (!playhead || !this._engine) return;
|
|
6099
6099
|
const engine = this._engine;
|
|
6100
|
-
const
|
|
6101
|
-
const audibleTime = () => {
|
|
6102
|
-
const outputLatency = "outputLatency" in ctx ? ctx.outputLatency : 0;
|
|
6103
|
-
const t = engine.getCurrentTime() - outputLatency - engine.lookAhead;
|
|
6104
|
-
return Number.isFinite(t) ? Math.max(0, t) : 0;
|
|
6105
|
-
};
|
|
6100
|
+
const audibleTime = () => engine.getAudibleTime();
|
|
6106
6101
|
if (this.scaleMode === "beats") {
|
|
6107
6102
|
const secondsToTicksFn = (s) => this._secondsToTicks(s);
|
|
6108
6103
|
playhead.startBeatsAnimationWithMap(audibleTime, secondsToTicksFn, this.ticksPerPixel);
|
|
@@ -6113,10 +6108,7 @@ var DawEditorElement = class extends import_lit15.LitElement {
|
|
|
6113
6108
|
_stopPlayhead() {
|
|
6114
6109
|
const playhead = this._getPlayhead();
|
|
6115
6110
|
if (!playhead) return;
|
|
6116
|
-
const
|
|
6117
|
-
const outputLatency = "outputLatency" in ctx ? ctx.outputLatency : 0;
|
|
6118
|
-
const lookAhead = this._engine?.lookAhead ?? 0;
|
|
6119
|
-
const t = this._currentTime - outputLatency - lookAhead;
|
|
6111
|
+
const t = this._currentTime;
|
|
6120
6112
|
const visualTime = Number.isFinite(t) ? Math.max(0, t) : 0;
|
|
6121
6113
|
if (this.scaleMode === "beats") {
|
|
6122
6114
|
playhead.stopBeatsAnimationWithMap(
|