You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: WAV header parse gives up after 1 KB, silently disabling playback #358
The chunked audio engine -- the default playback path -- reads its own WAV headers rather than using the browser decoder. It fetches the first kilobyte of each stem:
and walks the RIFF chunks looking for data. If data has not appeared within those 1024 bytes, _parseWavHeader returns null, the stem has no header, and ready resolves false:
console.warn("[player] audio engine had no usable stems; playback disabled");
The result: no waveforms (nothing to scale the lanes to), transport stuck at 0:00 / 0:00 even though the analysis header shows the real duration, and the play button does nothing.
Which files break it
Running the real parser against layouts other WAV writers produce, with the same 1 KB window the engine uses:
So it works for what we write today and fails for anything that puts more than a kilobyte in front of the audio. torchaudio.save dispatches to whichever backend is installed (ffmpeg libraries, soundfile, sox), and those do not all write the same header, so this can differ between two machines running the same StemDeck build -- which is how it would present as a hardware or driver problem.
Expected
Find the data chunk wherever it is: read further when the first request does not reach it, or fall back to the streaming path instead of leaving the track unplayable.
Failing closed on an unusual header is the wrong default when a working alternative playback path already exists.
Reported there as broken waveforms and dead playback on one Linux machine but not another, with the UI otherwise rendering perfectly. The signature matches: analysis duration present, transport 0:00 / 0:00, empty lanes. Not confirmed against the reporter's own files yet.
Activity
fix(player): read the whole WAV header, and say so when a track canno…