/** * Resolution of caller-facing time positions into exact sample indices. * * Editing operations take positions in whatever unit is natural at the call * site. Everything funnels through here so that "1:30" means the same thing in * `cut`, `fade`, and `mix`, and so an out-of-range value is reported once, * clearly, instead of silently clamping in three different ways. */ import type { TimePosition } from '../types.js'; /** * Converts a {@link TimePosition} to a sample index. * * Negative values count back from `totalFrames`, matching `Array.prototype.slice` * — `cut({ from: -5 })` takes the last five seconds. The result is clamped to * `[0, totalFrames]`. */ export declare function toSampleIndex(position: TimePosition, sampleRate: number, totalFrames: number): number; /** Converts a duration (never relative to the end) to a frame count. */ export declare function toFrameCount(duration: TimePosition, sampleRate: number): number; /** Formats seconds as `h:mm:ss.mmm`, for messages and display. */ export declare function formatDuration(seconds: number): string;