@dawcore/components 0.0.25 → 0.0.26
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.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -645,6 +645,14 @@ interface RecordingOptions {
|
|
|
645
645
|
startSample?: number;
|
|
646
646
|
/** Start playback during recording so user hears existing tracks. */
|
|
647
647
|
overdub?: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* Latency offset to skip at the start of the recording, in **seconds**.
|
|
650
|
+
* Absolute replacement for the auto-computed `outputLatency`-based value —
|
|
651
|
+
* use this to apply an externally-measured round-trip latency. `0` disables
|
|
652
|
+
* compensation; when omitted, the auto-computed value is used.
|
|
653
|
+
* Negative or non-finite values are treated as 0.
|
|
654
|
+
*/
|
|
655
|
+
latencyOffset?: number;
|
|
648
656
|
}
|
|
649
657
|
interface RecordingSession {
|
|
650
658
|
readonly trackId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -645,6 +645,14 @@ interface RecordingOptions {
|
|
|
645
645
|
startSample?: number;
|
|
646
646
|
/** Start playback during recording so user hears existing tracks. */
|
|
647
647
|
overdub?: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* Latency offset to skip at the start of the recording, in **seconds**.
|
|
650
|
+
* Absolute replacement for the auto-computed `outputLatency`-based value —
|
|
651
|
+
* use this to apply an externally-measured round-trip latency. `0` disables
|
|
652
|
+
* compensation; when omitted, the auto-computed value is used.
|
|
653
|
+
* Negative or non-finite values are treated as 0.
|
|
654
|
+
*/
|
|
655
|
+
latencyOffset?: number;
|
|
648
656
|
}
|
|
649
657
|
interface RecordingSession {
|
|
650
658
|
readonly trackId: string;
|
package/dist/index.js
CHANGED
|
@@ -2836,8 +2836,12 @@ var RecordingController = class {
|
|
|
2836
2836
|
}
|
|
2837
2837
|
const channelCount = detectedChannelCount ?? options.channelCount ?? 1;
|
|
2838
2838
|
const startSample = options.startSample ?? Math.floor(this._host._currentTime * this._host.effectiveSampleRate);
|
|
2839
|
-
const
|
|
2840
|
-
|
|
2839
|
+
const latencySamples = (0, import_core3.resolveRecordingOffsetSamples)({
|
|
2840
|
+
overrideSeconds: options.latencyOffset,
|
|
2841
|
+
outputLatency: rawCtx.outputLatency ?? 0,
|
|
2842
|
+
lookAhead: 0,
|
|
2843
|
+
sampleRate: rawCtx.sampleRate
|
|
2844
|
+
});
|
|
2841
2845
|
const source = this._host.createMediaStreamSource ? this._host.createMediaStreamSource(stream) : rawCtx.createMediaStreamSource(stream);
|
|
2842
2846
|
const workletNode = this._host.createAudioWorkletNode ? this._host.createAudioWorkletNode("recording-processor", {
|
|
2843
2847
|
channelCount,
|