/**
 * Sample-accurate volume automation.
 *
 * The audio mixer's primary path for time-varying volume bakes the envelope
 * directly into the prepared PCM rather than encoding it as an FFmpeg `volume`
 * expression. The expression approach nests one `if(lt(t,...))` per keyframe and
 * overflows FFmpeg's expression evaluator past ~95 levels (a dense GSAP fade
 * emits hundreds of keyframes), which fails the whole mix and drops the audio
 * track. Multiplying the samples in-house has no such ceiling, is exact at every
 * sample, and keeps the downstream ffmpeg `amix`/AAC encode untouched — so the
 * output (and the golden baselines) only change where a fade is actually applied.
 *
 * The prepared tracks are always `pcm_s16le`, 48 kHz, stereo (see
 * `prepareAudioTrack` / `extractAudioFromVideo`). Anything else is rejected so
 * the caller can fall back to the expression path rather than corrupting audio.
 */
import type { AudioVolumeKeyframe } from "./audioMixer.types.js";
/**
 * A gain lookup that walks forward through the envelope with a segment cursor,
 * so a whole track costs O(N+M) rather than O(N×M). `interpolateVolumeGain`
 * restarts from segment 0 on every call — fine for the preview path (once per
 * RAF tick), not for a per-sample walk over 48k×duration frames.
 *
 * The cursor only ever advances, so callers must pass non-decreasing times.
 * Returns null when the keyframes normalise to nothing, which the callers read
 * as "no automation here".
 */
export declare function createEnvelopeWalker(keyframes: AudioVolumeKeyframe[], trackStart: number, baseVolume: number): ((time: number) => number) | null;
/**
 * Multiply a prepared WAV's samples by a time-varying gain envelope in place.
 *
 * @returns `true` if the envelope was applied; `false` if the file isn't the
 *   expected 16-bit PCM (caller should fall back to the expression path).
 */
export declare function applyVolumeEnvelopeToWav(wavPath: string, keyframes: AudioVolumeKeyframe[], trackStart: number, baseVolume: number): boolean;
//# sourceMappingURL=audioVolumeEnvelope.d.ts.map