Background
The WAV export click handler at index.html:1872-1879 pushes a fallback "whole file" AudioData into the shared audioDataArray when it's empty. That mutates module-level state from a click handler. Currently harmless (checkStrikeThrus early-returns when audioDataArray.length < 2) but it's a latent side effect that will bite when more code reads the array.
Proposed change
Build a local export array instead, leave audioDataArray alone.
const exportData = audioDataArray.length > 0
? audioDataArray
: [new AudioData(player.src, 0, player.duration)];
const wavBlob = await cutAudioApp.cutAudio(exportData);
Acceptance criteria
Notes
May be subsumed by the export-modal work — but small and safe to land independently.
Background
The WAV export click handler at
index.html:1872-1879pushes a fallback "whole file"AudioDatainto the sharedaudioDataArraywhen it's empty. That mutates module-level state from a click handler. Currently harmless (checkStrikeThrusearly-returns whenaudioDataArray.length < 2) but it's a latent side effect that will bite when more code reads the array.Proposed change
Build a local export array instead, leave
audioDataArrayalone.Acceptance criteria
audioDataArray.Notes
May be subsumed by the export-modal work — but small and safe to land independently.