diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-22 09:47:34 -0300 |
|---|---|---|
| committer | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-22 09:47:34 -0300 |
| commit | b8ad3a7be2efd92d176d92b15c96c38af2880130 (patch) | |
| tree | 0ab5dbd65e3789cc19e662a1509ec5d5213dd5a8 /runtime/test/queue_proxy_test.cpp | |
| parent | 41f448261e1de8a410b4d760e69a7e5656cef858 (diff) | |
awc_opus: accept a streamed-music descriptor whose last block is short
944961c5 (#1320) rejected a music descriptor when blocks * chunk exceeds its data tag. But game
banks end the tag inside the last block: `chunk` is the stride between blocks, not the size of
the last one (e.g. 1 block of a 524,288-byte chunk in a 264,192-byte tag). So every real
streamed-music descriptor was refused, and its channels were dropped by awc_opus and
awc_manifest.
The descriptor-level check now requires each block to start inside the tag,
(blocks - 1) * chunk < d_size. Each block's record table (channels * 24 bytes) and its subblock
run are still checked against the bytes left at that block, so the malformed cases #1320 guards
against are still refused.
Real data (counts only), one audio carve window, 1,052 banks:
- main 41f4482: 46 "ignored malformed streamed-music descriptor" warnings, 0 music channels,
482,628 streams.
- this change: no warnings, 96 music channels (the same as before 944961c5), 482,724 streams.
- All 46 descriptors give channel and packet lists identical to the code before 944961c5.
Tests: ShortLastMusicBlockTest, with a single short block and a 3-block bank whose last block is
shorter than the stride (main: both refused), plus two refusal controls: a last subblock cut
short, and a block declared past the tag. MalformedMusicGeometryTest (#1320) still passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/queue_proxy_test.cpp')
0 files changed, 0 insertions, 0 deletions