scripts/xa-audio-core.js — demo audio core: load → draw → loop

One page exercising all three exports together on the 15 s golden WAV: loadAudioFile (with its URL cache), drawWaveform (loop overlay {0.25, 0.5}), and initAudioProcessor playing the native looped region. Badges: loop duration exactly 0.25 × duration (3.750 s for the 15 s file), 20/20 playhead samples inside [0.25, 0.5], cache identity (second load returns the === same AudioBuffer), and pixel probes proving the loop markers paint at x = 0.25·width and 0.5·width.

press run