import type { AudioProcessor } from './AudioProcessor'; export class ExpFadeIn implements AudioProcessor { getName(): string { return 'Fade In (Exp)'; } getDescription(): string { return 'Applies an exponential fade from silence to current level'; } process(leftIn: Float32Array, rightIn: Float32Array): [Float32Array, Float32Array] { const length = leftIn.length; const leftOut = new Float32Array(length); const rightOut = new Float32Array(length); for (let i = 0; i < length; i++) { const t = i / length; const gain = 1.0 - Math.exp(-5.0 * t); leftOut[i] = leftIn[i] * gain; rightOut[i] = rightIn[i] * gain; } return [leftOut, rightOut]; } }