scripts/live-speed-control.js — playbackRate vs resample tiers

Two live speed tiers, each with an assertable signature. playbackRate tier: applyLiveDoubleSpeed() crossfades to a replacement source whose playbackRate.value must be exactly 2.0, stopping the old source after the 50 ms fade (the audible octave jump). Resample tier (preservePitch: true): the returned buffer keeps the ORIGINAL length, newLoopLength === floor(len/2), and the trailing half must be exactly silent — 2× resampling writes the compressed audio into the first half only; that silence is the tier's assertable signature. resetLiveSpeed() restores rate 1.0. Dependencies are injected explicitly (no window bus). Resample + error contract asserts spot-run headless in Node pre-ship.

loading golden WAV…