…truncated tracks
- SectorReader.ParseTracksWithLba: stop adding Pregap frames to
ChdOffset/StartLba. chdman stores the pregap inside the track's
FRAMES (silence before the data), so the old offsets shifted every
track after the first pregap by 150 frames (2s) — music started
late, each track's tail bled into the next track's intro, and the
last track mapped past the CHD end, leaving its final 148 frames
unreadable (declared BIN/WAV sizes exceeded the readable content).
- ChdContainer virtual export:
* CUE/ISO mode: the .iso now contains the audio tracks the CUE
references (audio sectors at 2352 B/s), so emulators no longer hit
EOF on CD audio reads; the declared size now matches the content.
* WAV export: skip the pregap frames so each WAV begins at the
music (INDEX 01 00:00:00) and has the correct length
((frames - pregap) * 2352).
* WAV-mode data-track INDEX positions are now relative to the
data-file content instead of the cumulative disc frame stream, so
audio-first layouts and multiple data tracks produce correct CUE
sheets.
* Single-file (non-WAV) modes now register the BIN/ISO entry even
for audio-only discs, which the CUE references but which was
previously missing from the mount.
* Audio sectors in BINARY files use 2352 B/s only when the CHD
stores raw sectors (UnitBytes >= 2352); cooked 2048-byte-unit
CHDs (theoretical; chdman cannot produce them with audio) read at
the unit size.
* ReadVirtualBin/ReadVirtualWav use the per-track sector size and
pregap-aware offsets consistently.
```