/** * Structural edits: cutting, joining, padding, reversing, and mixing. * * Every function here takes and returns planar channel arrays and allocates a * fresh result. Nothing mutates its input — an editing pipeline that mutates in * place makes `const original = ...` a lie, and undo impossible. */ /** Extracts frames `[start, end)` from every channel. */ export declare function slicePlanar(channels: readonly Float32Array[], start: number, end: number): Float32Array[]; /** Removes frames `[start, end)`, joining what remains. */ export declare function removeRange(channels: readonly Float32Array[], start: number, end: number): Float32Array[]; /** * Concatenates buffers end to end. * * All inputs must already agree on channel count — this operates on raw sample * data and has no sample rate to reconcile. The `Audio` wrapper checks rates * before delegating here. */ export declare function concatPlanar(buffers: ReadonlyArray): Float32Array[]; /** Adds silence before and/or after. */ export declare function padPlanar(channels: readonly Float32Array[], before: number, after: number): Float32Array[]; /** Reverses every channel in place-equivalent fashion, returning new arrays. */ export declare function reversePlanar(channels: readonly Float32Array[]): Float32Array[]; export interface MixOptions { /** Frame at which the overlaid buffer starts. Defaults to 0. */ offset?: number; /** Linear gain applied to the overlaid buffer. Defaults to 1. */ gain?: number; /** * Extend the result when the overlay runs past the end. Defaults to `false`, * which truncates to the original length. */ extend?: boolean; } /** * Sums `overlay` onto `base`. * * Summing can exceed ±1. Nothing is clamped here — clipping is a decision for * the point where audio leaves the float domain, and clamping early would * silently destroy headroom that a later `normalize` could have recovered. */ export declare function mixPlanar(base: readonly Float32Array[], overlay: readonly Float32Array[], options?: MixOptions): Float32Array[];