Burnout 2 Xbox audio DSP research (verified target, 2026-10-08)

Source: the supported default.xbe, SHA256
B5207C40C11D7C5B5E129EF555F7632FA3584A4240BD0421C2B1B9AD9BFED7BF.
Disc data/b2distfx.bin: 21756 bytes, SHA256
4DA840E1EFADADE3FD7DDFE5DC0500157DEDC133F18748B738F8D00EE3746BE8.
Private media and generated programs remain ignored.

Boot's earlier invalid sound pointer came from rejecting Xbox MEM_NOZERO
(0x800000) in NtAllocateVirtualMemory. The original heap requests 0x801000
for its 0x783000-byte audio allocation. Supporting the flag advances boot to
actual audio initialization, rather than substituting pointers or callbacks.
Flag corroboration: XboxDev/nxdk lib/xboxkrnl/xboxkrnl.h, MEM_NOZERO.

Public DirectSoundCreate: 0x22FC18, three stack arguments, ret 0x0C.
Public DirectSoundDownloadEffectsImage: 0x22D6E6, five stack arguments, ret 0x14.
The preserved service record at 0x230ABD is an internal thiscall function,
not the public upload boundary. Do not bind it as a public three-argument API.
Title loader 0x10AA10 uploads the image and passes locations 2 and 4.
SDL sound-device creation and native effect upload now succeed.

Image metadata:
  0x804: 2543 program words; 0x80C: 2326 data words.
  Payload begins at 0x818. Descriptor table starts at
  0x818 + 4 * (2543 + 2326) = 0x542C.
  Table contains five effects, eight header bytes, five 32-byte descriptors,
  followed by five encrypted eight-byte program seeds.
  Descriptor +4 is each effect's program size in bytes.

Effect  File offset  Program bytes  DSP state base (entry's r5 immediate)
0       0x0818       144            X:0x0080
1       0x08A8       532            X:0x00AE
2       0x0ABC       4184           X:0x00C5
3       0x1B14       4844           X:0x02EF
4       0x2E00       464            X:0x0519

SDK image loader 0x230850 decodes the seed array, then each program separately.
Seed routine 0x23637D takes one output pointer, ret 4; it seeds 0x236304 with
low word 0x49DE12BA and high word 0x7FA49BCA, then steps 80 times.
Decoder 0x2363AA takes seed pointer, input, byte count, output, mode; ret 0x14.
The image loader uses mode zero and in-place output.
Cipher step 0x236304 takes four stack arguments, ret 0x10; state is stored at
0x24AD90/0x24AD94. These routines are already compiled ahead of time.

b2 --inspect-effects XBE IMAGE OUTPUT_DIRECTORY executes these original SDK
routines without booting, with a 64 KiB image cap. It recovered all five programs.
The first program performs 32-frame gain mixing into one or more output buffers;
flag bit 1 chooses addition to existing output. The other programs include
distortion, filters and delay processing; all five execute as compiled C++.
No DSP interpreter, emulator or JIT is linked into the recompilation.

Bounded research disassembly used dsp56300-disasm 1.0.0 (MIT):
https://github.com/mborgerson/dsp56300
Windows x64 release archive SHA256 (checked against its release asset digest):
6EC091D3E4B6E6E6276B474C852736449D7F538A1F8826A89E3CB6E787BC5AC6.
Only the disassembler and its licenses were extracted; no emulator was used.
ISA reference: https://www.nxp.com/docs/en/reference-manual/DSP56300FM.pdf

Observed instruction families in effects 1..4: move, add, bsr, dor, rts, bra,
brset, bset, movep, macr, cmp, movec, asl, brclr, beq, sub, nop, clr, mac,
and, blt, bclr, lua, bge, asr, mpy, mpyi, neg. Decryption and disassembly alone
do not establish execution or parity.

Native effects implementation

b2-tool compile-effects emits fixed native functions and direct calls for all
1754 instructions: effects 0..4 contain 27, 103, 707, 827 and 90 instructions.
Unknown encodings fail generation; the game has no runtime DSP decoder, JIT
or interpreter. Uploaded programs must match the compiled fingerprints.
The native image decoder independently matches every byte of the original
compiled SDK output. Effects execute in 32-frame blocks using 24-bit samples,
56-bit accumulators and convergent rounding. SR bit 20 enables saturation mode;
it does not select integer multiplication.

Native DMA follows bounded seven-word descriptors and performs actual circular
delay-buffer copies before reporting completion. Ports X:FFFFD4/FFFFD6 select
the next node and control DMA; X:FFFFC5 exposes the completion interrupt.
Source register/encoding corroboration:
https://github.com/mborgerson/dsp56300 (v1.0.0)
https://github.com/xemu-project/xemu/tree/master/hw/xbox/mcpx/apu
These sources were consulted for hardware facts; no emulator is linked.

The native upload exposes synchronized X state at FE830000, read-only compiled
program bytes at FE83A000 and persistent native scratch at FE900000. The guest
receives the original descriptor fields with these native address relocations.
SDL processing and CPU effect-parameter reads/writes share the same state.
Unsupported DMA formats, modulo addressing and changes to live program layout produce
explicit boundaries instead of pretending to succeed.

--check-effects passes 65 arithmetic, gain, filter, routing, parameter and five-program graph checks.
Its 2048-frame graph transfers 138240 delay words. A Ryzen 5 5600X processed that
component in 3.6703 ms; this is not a game FPS or audio-parity measurement.
HRTF filtering, stream packets and reference listening remain incomplete.

All 32 input bins feed the compiled graph through the shared X:C00..FFF and
X:1400..17FF windows. Public buffer descriptor +14h selects the input of an
FX source; the first six bins feed native speaker folding.
Per-bin headroom uses binary shifts, and per-source headroom uses hundredths of
a decibel. Original 21161D/211634 timestamp conversion reads the real native
48 kHz sample clock at FE80200C. Same-layout uploads prepare a new native state,
swap it under the SDL stream lock and retire the previous state outside that lock.

Resource method discovery

The sound descriptor constructor calls 10D4F0 with two literal table/count pairs.
Its loops at 10D560 and 10D5B0 use 24-byte source records; +14h is a callable
method and null methods become ED200. GUID/type metadata occupy earlier fields.
The table at 345610 contains seven records, including 10A9D0 at 3456B4.
The game later copies these methods into eight-byte {code, method-id} records
and dispatches them at 10C530. Static discovery must follow this registration
contract; these are not contiguous vtables or arbitrary code-looking data.

Native audio work

22D9CA is the no-argument, void DirectSoundDoWork entry (RET, no stack cleanup).
The verified prefix is 56 E8 C5 E6 FF FF 0F B6 F0 A1 C0 AC 24 00. It tests the
device at 24ACC0 and calls 22C4D0, which passes the device's MCPX object at +0Ch
to 231128. That routine drains the hardware object's notification list at +4B0h
and invokes each record's virtual callback. Native device creation owns no MCPX
object, so translating this private hardware path cannot process native voices.
The public binding instead publishes actual SDL mixer buffer state and errors.
No-device calls remain valid. Stream packet callbacks still require a native
stream implementation; this binding does not claim to implement them.

Buffer format changes

The original resource path calls SetBufferData (22EF4B) before SetFormat
(22EF2F, caller 1077F8), while asynchronous resource work fills the bound memory.
A boot snapshot shows 783000h bytes of backing capacity with stereo 48 kHz Xbox
ADPCM (72-byte blocks); the capacity includes 24 bytes beyond the last full block.
The native API binds the original guest memory rather than copying and decoding
an unfinished buffer. PCM reads that memory directly; ADPCM uses one 64-frame
block cache per voice (512 bytes maximum), shared with the strict offline decoder.
Playback allocates nothing and performs no file I/O or whole-buffer decode.
Format, binding, start, seek and loop wrap invalidate the block cache. Only complete
codec blocks are playable; capacity padding is not fabricated as sample data.
Offline data() owns its byte copy for callers without guest memory. The checks
exercise format changes with data attached, repeated format application, writes
after binding and a padded ADPCM allocation. Buffer storage must remain alive
until unbound, as required by the original SetBufferData ownership contract.

Effect-input bus format

An original FXIN buffer descriptor has flags 80010h, size zero and no format
pointer. The SDK default at 237B78 is PCM, mono, 48 kHz, 192000 bytes/second,
four-byte blocks and 24 bits of mixer precision. This describes a mix-bin input
bus, not an encoded sample buffer. Native buses accept that format and process
their existing floating mix-bin signals; encoded bytes cannot be attached to
them. PCM file decoding remains strict. Shared routing/gain checks now use this
original bus format, and a check rejects attaching sample memory to a bus.

Extended buffer stop

22D8D2 is the public four-word extended stop wrapper, ending in RET 10h. It
converts its public buffer to the private object and calls 22C9AE. The game's
107050 passes {buffer, time low=0, time high=0, flags=0} at 107072 and then
polls GetStatus until playback has stopped. The native binding performs that
actual immediate stop on the SDL voice and publishes its stopped state. Scheduled
or envelope modes remain explicit unsupported boundaries; no MCPX registers
are fabricated for the private hardware implementation.

Original 3D source calculations

22E8C4 is the four-word SetRolloffCurve wrapper; its original prefix is
FF7424108B442408FF7424108BC8 and it ends in RET 10h. 22E005 stores the point
pointer/count at 3D state +50h/+54h; setting apply bit 0 defers recalculation.
The resource caller at 106F78 passes {buffer,2CAE20,1,1}; that single float is
1.0 (original bytes 0000803F). 2302A4 interpolates distance curves from unity at
the minimum distance through their supplied points across the maximum distance.
A single unity point is constant; other one-point curves still interpolate.

SetAllParameters at 22E78C takes {buffer,76-byte DS3DBUFFER,apply}, RET 0Ch.
Its original leaf 22DD25 copies parameter +4h..+48h into source +8h..+4Ch.
This includes position, velocity, cone, min/max distance, mode and source factors.
Calculate3D (22EC59) takes {listener,source}; GetVoiceData (22CEDB) takes
{listener,source,listener-I3DL2,source-I3DL2,output}. Output +4h/+8h are distance
and cone attenuation in hundredths of a decibel, and +24h is Doppler pitch.
Source +68h is computed distance; +74h/+78h hold angular placement.

The native shared Spatial component executes those already compiled routines in
bounded 8 KiB mathematical scratch storage. Original 23074D initializes its full
mathematical dispatch table. FS:+58 is zero for this standalone calculation, so
the original 22BEDA/22BEFF guards perform no kernel mutex work. These routines
operate on parameter records and original constants, without MCPX objects.
They are ordinary AOT calls, not a runtime decoder or CPU interpreter.

SDL voices consume cached gain, stereo placement and pitch adjustments. Calls
commit only changed deferred settings; unchanged commits do no recalculation.
Native stereo placement is an approximation; console HRTF filtering and
audio scene parity are not claimed. Offline --check-spatial exercises the original
calculators without game boot or a sound device and measures repeated calculations.

Environmental source settings

Public SetI3DL2Source is 22E8E8, prefix 8B442404FF74240C8BC8FF74240C,
arguments {buffer,36-byte DSI3DL2BUFFER,apply}, RET 0Ch. Original leaf 22E048
copies nine words to source +80h..+A0h and marks source +7Ch dirty; apply 1
defers calculation. Immediate settings and explicit deferred commits update
the native source rather than entering uninitialized MCPX objects.

The original constructor copies 18 source words from 237C74 and nine
environmental words from 237C48 (22F116/22F12C). Listener constructor 22EF70
copies twelve environmental words from 237BD8. They encode the generic preset,
including Room=-1000, RoomHF=-100, RoomRolloff=0 and HFReference=5000.
The original generic preset differs from the silent API default.

GetVoiceData 22CEDB calls original 235B1C with the actual distance, listener
room rolloff, HF reference and source parameters. Its output +1Ch/+20h are
direct/room attenuation; +30h/+34h are direct/room filter coefficients. Original
235982 computes the 16-bit one-pole coefficients; SDL caches them and retains
fixed filter histories without allocations in the mixing callback. Original
232FED/233139..23315F establishes which mix bins receive each adjustment:
6/7 use direct attenuation plus output +0Ch/+14h; 8/9 use direct attenuation
plus output +10h; bin 10 uses room attenuation. Output +18h is the centre
speaker level, not the rear level (see the 2026-10-11 correction below).
All also receive distance/cone attenuation. The native max-distance mute flag
feeds source +58h bit 2 of the original calculation.

The actual upload locations are {reverb=2,crosstalk=4}. Effect 2's original
state C5h+5 holds 1540h, the input at 1400h+10*32; its program reads that
pointer at P:17Bh/17Fh. Native upload checks this input and room sends reach
the original compiled reverb graph. SDL's stereo placement still approximates
HRTF and listener preset changes remain incomplete. FXIN return processing is
described below. 12 spatial, 37 audio and 65 DSP offline cases pass without booting.

API layout/range and mix-bin corroboration (facts only):
https://gist.github.com/inactive123/2985275 (original Xbox dsound.h).

Buffer cursors and regions

Verified in the supported executable: public GetCurrentPosition 22D932 calls
22CADD, then CMcpxBuffer::GetCurrentPosition 234D32. A playing voice obtains
its hardware sample offset through 233C67; 231883 converts samples to bytes.
ADPCM conversion is (samples >> 6) * block_align, PCM is samples * block_align.
The write cursor leads by max(bytes(32 samples), block_align), rather than
being identical to the play cursor. Inside an active loop it is
loop_start + (play + lead) % loop_length; otherwise it wraps at allocation
capacity. Stopped voices return the cached play position for both outputs.

SetPlayRegion 22E908 -> 22E169 normalizes size zero to capacity - start.
22E112 stores play start/length at descriptor C0/C4 and resets loop C8/CC
to 0/length. SetLoopRegion 22D8F6 -> 22CA58 normalizes against play length
and changes C8/CC only. Invalid nonzero lengths return 88780032.
2351E6 resets the cached play position and updates hardware start through
234908: descriptor B8 supplies the source address, and C0 is added to that
address before setting the DMA page/offset. The sample cursor is relative
to the play region, rather than adding the region's source-memory offset.

Native buffer bookkeeping now retains source address/capacity at B8/BC,
normalizes region lengths, resets the loop on play-region changes, and
returns separate cursors. Five added cases exercise PCM lead/capacity wrap,
nonzero loop start, stopped cursors and one-block ADPCM lead. All 37 audio
cases pass without booting or opening a sound device.

Effect parameter overwrite (manual data watch, 2026-10-08)

Local manual-audio-watch-20261008-182654.log/.json reproduces the same failure
with manual input only: voice 17, stereo ADPCM block 91044, guest header
017D0650 = CBD838000D2D6200. The disc's corresponding right-channel header is
F8AD4300. A hardware write watch on 017D0654 catches a four-byte copy from
guest 00627E58 of value 00622D0D, with the neighboring encoded music unchanged.
The native stack is 236204 -> 230B56 -> 22C31A -> 22D734 -> title 10A720.

Verified original bytes establish public SetEffectData at 22D734, six stack
words and RET 18h. 10A720 passes deferred flag 1. The private SDK path computes
a hardware shadow offset at 230B8D (LEA with displacement 017D0618) before
236204 copies the parameter. Running that path without its MCPX objects writes
the parameter into ordinary guest RAM, overlapping the streaming music bank.
The invalid ADPCM index is the consequence, rather than a codec/data defect.

GetEffectData is 22D70D (five words, RET 14h), through 22C37C -> 230BFF.
CommitEffectData is 22D75E (one word, RET 4), through 22C3DB -> 2309EC.
2309C5 validates effect indices; 230B56 defers when flags bit 0 is set;
230BFF reads active state, and 2309EC submits queued parameter changes.

Bind all three public operations to native DSP state using the uploaded effect's
declared state address/size. Queue deferred bytes until commit, retain immediate
writes, and preserve unrelated live DSP history. No writes to music memory, no
ADPCM clamping, and no per-update allocation. The seven added offline effect
cases exercise the captured gain, commit visibility, immediate overwrite,
unaligned data, adjacent state, range bounds and image replacement.
The rebuilt release passes all 58 effect cases, 37 audio cases and 52 original
game CPU cases. Repeated manual replay validation remains to be completed.

Missing driving sound: shared mix buffers and FXIN returns

The manual routing capture manual-audio-routing-20261008-184823.log ended
normally with no audio failure and no automated inputs. It records an FXIN
voice on mix bin 14, routed engine sources, and effect 1's input/output both
set to DC0h. Original title 0D2845..0D2898 writes DC0h to effect 1 offsets
14h/18h through public SetEffectData. SDK 22F1A4 takes the FXIN input bin
from descriptor +14h. SDK 234FF7 binds that voice to a 32-sample region at
24AE48 + (input_bin - 11) * bytes(32 samples).

X:C00..FFF and X:1400..17FF name one 32-by-32 mix buffer. Previously the
native mixer duplicated six speaker bins, but other bins and effect writes
were separated. Distortion at DC0h could not read input bin 14 at 15C0h;
reverb writes and subsequent filter reads also failed to share their samples.
Dsp loads, stores and delay transfers now resolve the shared backing buffer.
Hardware address corroboration, without running an emulator:
https://github.com/xemu-project/xemu/blob/master/hw/xbox/mcpx/apu/dsp/interp/dsp_cpu.c

FXIN voices now consume the preceding processed block before the mixer replaces
its inputs. Source sends enter their selected bin; the return voice applies its
own gain, headroom, 3D placement and environmental filters once. FXIN activation
follows routed playing sources; FXIN2 retains explicit Play/Stop control.
The existing offline suite adds seven cases for shared effect addressing,
speaker audibility, captured engine routing, return volume/mute and FXIN2.
A native replay of the captured route produced peak zero before the fix and
0.625082 afterward. This proves signal delivery, not reference sound parity.

Earlier stereo gain increase (removed 2026-10-09)

The earlier quiet-engine investigation replaced equal-power panning with unity
gain on the stronger channel. This added up to 3.01 dB for centered 3D sources.
SDK 232FED applies equal distance/cone volume to paired bins 6/7 and 8/9
(selection at 233139..23315F), but those bin volumes do not establish the power
normalization of the native stereo approximation. GetVoiceData at 22CEDB exposes
distance/cone, front/back and environmental attenuation separately. SDK amplitude
conversion 22BF4D uses 2000.0 from 2C944C; hundredths-of-dB conversion and the
original 600-hundredths 2D headroom are unchanged.

After the actual listener-binding correction below, the user confirmed missing
sounds returned but the engine was too loud. Remove the earlier stereo boost:
use sqrt((1-pan)/2) and sqrt((1+pan)/2), preserving total power across directions.
The existing spatial check verifies centered channel gains sqrt(0.5). Original
source volumes, headroom, distance/cone and effect gains are retained. This is
still stereo placement rather than complete console HRTF filtering.

Shared SFX attenuation: listener API identity (2026-10-09)

Manual captures frame-35066655000, frame-37098290200 and frame-40748694500
save 9,150,692-byte audio snapshots. Offline replay succeeds with no audio errors.
In the third capture, engine FXIN voice 1 decodes peak 0.76699984 but sends only
0.03146265: spatial gain is 0.050003454. Traffic voices 27/29 decode peaks above
0.86 and send zero because their spatial gain is zero. Their source positions
are approximately {-357,68,-1268}, while the listener position is
{29.20445,0.16950999,-41.51002}, exactly the player's source velocity.

Original bytes establish that the public listener wrappers are:
  22F9C4 -> 22F6E4: position, three coordinates, RET 14h.
  22FA1D -> 22F757: velocity, three coordinates, RET 14h.
  22F97A -> 22F657: orientation, six coordinates, RET 20h.
  22F932 -> 22F53A: distance factor, RET 0Ch.
  22F9F9 -> 22F5F8: rolloff factor, RET 0Ch.
  22F956 -> 22F599: Doppler factor, RET 0Ch.
Each includes the public object and immediate/deferred argument.
The private setters write settings +3C/+48/+54/+60/+6C/+70/+74 respectively;
the two orientation vectors occupy +54 and +60. Title 10AD00 calls these six
wrappers at 10ADBD/10ADE3/10AD98/10AD48/10AD61/10AD2F with distinct fields.
Position and velocity wrappers share their first nine bytes; identical prefixes
alone do not establish which API they implement.

The native provider mislabeled velocity as position and Doppler as distance.
Real position, distance and rolloff setters were still entering private SDK
objects that the native provider does not use. This displaced the listener and
applied distance attenuation/max-distance mute to otherwise valid SFX.
Correct all six public bindings and retain each listener field independently,
including deferred commits. This changes the shared 3D path without volume
boosts or sound-specific exceptions. Offline binding verification compares the
native state with the original deferred setters, then exercises mixed commits.
The user confirmed that the missing sounds returned after the listener correction.
Post-fix captures frame-37968894700 and frame-40069468200 show correct world-space
listener position, separate velocity, distance=1, rolloff=0 and Doppler=0.625.
Engine spatial gain is now 1 and routed peak 0.6292095; active traffic sounds
also reach the output. The user's excessive-engine-volume report prompted removal
of the earlier stereo gain increase described above. The user confirmed the engine
balance is better after its removal. Final capture frame-38516072200 retains the
correct listener fields and engine spatial gain 1; its stereo gains are
0.70710236/0.7071112, matching equal-power placement without the earlier boost.
Offline replay passes. Its routed peak includes the unpanned room send, so that
aggregate meter alone cannot measure the stereo gain reduction.
The release passes 31 binding comparisons/commit cases, 12 spatial cases with
1000 original calculations, 42 audio cases including serialized capture replay,
65 original effect checks and the existing CPU checks. Original deferred setters
are invoked with their supported DPC guard (FS:+24 = 1) to skip the device mutex;
they copy the actual settings fields without hardware, a scheduler or game boot.

Race music stream stop (2026-10-10)

Log b2-20261011-012421-4324.log stops at 22CE71 with arguments
{stream=0114A000, time low=0, time high=0, flags=5}. The return address 22D9C2
belongs to the original four-word adapter 22D9AD, ending C21000 (RET 10h).
XACT 210A20 chooses flags 5 at 210A53..210A62 for an envelope stream stop.
The native binding rejected every nonzero flag, including this immediate request.

Original 22CE71 branches to 231E29 for nonzero flags and to synchronous 232059
for flags zero; the latter ignores the timestamp. 231E29 uses 231963 directly
when both timestamp words are zero, otherwise it schedules command 4. 231963
tests envelope bits 6 at 231982 and retained-envelope bit 4 at 231988. Bit 4
sets internal 1000h at 231992 and calls release helper 233553; other modes
enqueue command 3 to flush the queue. Default release durations are zero:
22F34B allocates the cleared descriptor through 22BE7F/22FD25; 22F0B3 leaves
its envelope selectors at +28h and parameter arrays at +30h zero. 232FED
converts those parameters for the hardware voice. No custom envelope provider
is currently supported.

23214A completes released active packets with success through 231F96 (push 0
at 232185), then changes internal 1000h to 2000h at 2321A9..2321B7. GetStatus
2319D5 maps 2000h to public 80000h at 2319EA..2319F1. 232402 and 23214A
skip activation while that bit is retained: free slots can accept packets,
but those packets cannot restart the stopped stream. Repeating ENVELOPE2
retains that state. Synchronous 232059 aborts queued packets with 80004004h
and clears 3000h at 232130. 231C94 publishes the original submitted size.

The native zero-release path stops mixing, defers packet publication to DoWork,
retains envelope completion and prevents restart until regular Flush. Existing
offline binding checks exercise the logged adapter, deferred completion, stream
reuse and queued packets after completion. All twelve original WMA track checks
also execute the same stop operation. Timestamp scheduling and custom release
envelopes remain unsupported; no hardware register emulation or invented fade
is added. ABI constants cross-check only, with no implementation copied:
https://raw.githubusercontent.com/Cxbx-Reloaded/Cxbx-Reloaded/master/src/core/hle/DSOUND/XbDSoundTypes.h

Validation: release rebuild succeeded; 74 native binding checks, 54 spatial
cases/1000 original calculations, 64 audio cases and the existing CPU suite
pass. All twelve WMA tracks pass the logged stop operation after 96000 mixed
frames each. Reports are under build/checks/crash-stream-flush (binding results
in bindings-final). The user must verify the live race transition separately.

Live SFX crackling investigation (2026-10-10, incomplete)

User captures frame-209744663700 and frame-214498810300 have music disabled.
The second includes 228000 actual mixed frames and 475 WASAPI callbacks at
48000 Hz, with a 480-frame device buffer. Callback work averages 1.357 ms,
peaks at 2.092 ms, and never exceeds its 10 ms audio budget. The largest
callback start gap is 10.13 ms. The raw output peak is below 0.062 before
master gain 0.5; this recording does not show output clipping or starvation.

The live PCM16 left channel contains 68 sample jumps over 150 units at
callback offset 32; the largest is 722 at frame 56672. Other samples have
first-difference RMS 10.75 units, versus 167.32 at those boundaries. This
locates the recorded discontinuities in the shared native mix, before device
output. Both frozen two-second replays are smooth: maximum sample differences
83 and 53. Their output peaks are 0.061448 and 0.059092.

A bounded native diagnostic replay of the first snapshot plus the second
capture's 8136 volume/frequency events yields maximum difference 0.002483
(about 81 PCM16 units). This trace is truncated and excludes effect updates;
it cannot reproduce all live controls or prove an effect implementation fault.
The original D2D05..D2E22 submits seven effect-1 parameter words through
10A720/22D734; 10AE22 commits through 22D75E. The two snapshots contain different
coefficients, including X:BB values 5FFFFF and 2FFFFF, but provide no update
history. The shared trace now records these APIs with their actual payloads,
processing clocks and callers, capped at 64 payload bytes per write. No engine
exception, gain adjustment, smoothing or speculative timing change was added.
Need another short F8 pair to establish the changing parameter and its cause.

Offline capture/audio: 66 cases pass; original compiled effects: 65 checks pass;
spatial calculations: 54 cases / 1000 calls pass; native bindings: 74 cases pass.

Live control continuity correction (2026-10-10)

The next two user captures are frame-58706835200 and frame-61290717700.
Music is disabled. The latter contains 123840 live frames, 5897 untruncated
control events, 1015 four-byte effect writes and 145 effect commits. Replaying
the first snapshot with every recorded volume, frequency and effect update
reproduces the live recording within one PCM16 unit, after its 480-frame lead.
This ties the clicks to native processing rather than a device dropout.

Effect 1 offset 34h changes between 2FFFFFh and 5FFFFFh, with intermediate
values. Original D2DED submits that word through 10A720/22D734. Original DSP
P:73..80 loads it as a fractional multiplier for the processed signal. Holding
only this parameter constant removes the large discontinuities; holding offset
1Ch does not. The original SDK commit copies words and this effect contains no
gain ramp. No incorrect original arithmetic or timer behavior was established.

The native control boundary now transitions continuous effect coefficients
over 800 samples (25 original 32-sample blocks). Interrupted transitions start
from their current value; identical repeated targets do not restart them.
Committed target readback and immediate/deferred visibility remain intact.
Build-time analysis marks only read-only state used in fractional products;
the verified image selects X:B5/B6/B7/B8/B9/BB/BD. Routing pointers, flags,
loop counts and writable filter history keep their original semantics. This is
native control interpolation, not a claim of recovered console gain-ramp code.

Every voice also interpolates changes in its combined volume, headroom, spatial
and send gains across a 32-sample block. This includes routed sources and FXIN
returns, without a sound ID or engine-specific condition. Original targets,
source phase, pitch and sample data are retained. Starts and explicit seeks use
their new controls immediately. No output filter or volume reduction is used.

During the recorded interval, maximum PCM16 sample difference falls from 667
to 90. Difference RMS at the affected callback offset falls from 149.28 to
15.21; elsewhere it remains 10.59 versus 10.54. Replay peak remains 1913.
Three snapshots taken during event replay restore to identical floating output,
including pending coefficient transitions. New captures serialize that state
and prior B2AUD001 voice/effect layouts remain readable.

Release rebuild succeeds. Both new frozen captures replay 96000 frames with no
failures. Existing diagnostics pass 67 audio cases with capture, 65 effects,
54 spatial cases / 1000 original calculations, 74 bindings, 52 CPU cases and
all twelve original WMA tracks. Evidence and native replay files are ignored
under build/checks/sfx-crackle. Live listening remains the user's manual check.

Engine loudness: original speaker-level mapping (2026-10-11)

User capture frame-35601046600 has the engine FXIN return on voice 1/bin 14.
Its decoded peak is 0.76699984, return gain 0.5000345, distance/cone gain 1
and headroom 1. The frozen scene peaks at 0.47416764 before master volume;
RMS is 0.132351059. This is excess signal gain, not output clipping.

The earlier native interpretation of GetVoiceData +14h/+18h as front/back
levels was incorrect. Verified original 232FED reads its 3D record at A4h:
233036..23305E combines output +0Ch, +14h and +1Ch for the front bins;
233062..23307C combines +10h and +1Ch for the rear bins;
233080..23309C combines +0Ch, +18h and +1Ch for the centre bin.
23312F..23315F selects these independent totals for bins 2, 6/7 and 8/9.
Each also receives the original source volume and distance/cone attenuation.

Native stereo settings leave source +58h bit 0 clear. Original GetVoiceData
22CFBD..22CFE2 passes that bit to 22C018 -> 230445. Its branch at 230501
sets output +0Ch to zero and +10h to -10000, silencing the rear pair.
Output +18h is a separate centre contribution. The captured player return
had native front/back gains 0.5000345/0.7071312, so the incorrect rear send,
folded to stereo at sqrt(0.5), added another approximately 0.5 of the signal.
Correct the shared Spatial result to use amplitude(+0Ch +14h) for the front
and amplitude(+10h) for the rear. Preserve voice controls, routing, pan,
effects, environmental sends, music and the existing control transitions.
This fixes the common calculation used by all 3D sources, not an engine ID.

The SDK's default mix-bin headroom is one, but title 20DF43..20DF50 explicitly
sets all 32 bins to zero; D2938 also sets bin 14 to zero. Capture values match
those overrides. Default headroom therefore does not explain this scene.
The verified original stereo encoder at 5C0058 also uses unity front and
sqrt(0.5) centre/surround coefficients; stereo folding is not the cause.

Bounded native evidence under build/checks/engine-volume includes disassembly
of the original functions and small original DSP firmware ranges. A standalone
diagnostic executes the unchanged generated 232FED function with the original
stereo levels: its front/rear hardware volumes are 385/4095 (rear mute).
It then restores the actual capture twice, correcting only the misread rear
controls on its 13 normal 3D voices. The 96000-frame baseline reproduces the
inspection exactly. Corrected peak is 0.28362218, RMS 0.071512333, a 5.35 dB
scene RMS reduction. WAVs and diagnostic sources stay ignored; the user's
original capture is unchanged. This comparison retains the captured effects
and room history and excludes master volume. Full HRTF filtering remains an
explicit approximation; this measurement does not establish full audio parity.

The release rebuild succeeds. Existing checks pass: 54 spatial cases with
1000 original calculations and the corrected centered-source assertion,
74 original binding cases, 67 audio cases, 65 effect checks and all 12 WMA
tracks. The rebuilt build/windows/Release/b2.exe is ready for manual listening.

Intermittent pop audit: sound-buffer ownership (2026-10-18)

The user reports occasional quiet pops without a reproducible scene. Audit
covered PCM/Xbox ADPCM boundaries, looping and packet resampling, gain changes,
DSP return timing, source endings, control delivery and SDL buffer delivery.
The existing offline audio/effects checks passed before any change. Some sharp
transients in the saved frame-600173847000 mix also occur in isolated source
samples; a large adjacent-sample difference alone does not establish a bug.

Verified target B5207C40C11D7C5B5E129EF555F7632FA3584A4240BD0421C2B1B9AD9BFED7BF:
original buffer AddRef at 22C1E4 increments raw object +4 (22C20F). Release's
core 22BF2A decrements that same field and destroys only at zero. The native
provider instead kept a separate count, missing original AddRef calls. Stream
AddRef 22CBC4 uses raw object +8; its native methods now share that field too.

Original SetOutputBuffer's shared 22DCB4/22DADD path stores a retained raw
destination at settings +B0. At 22DB4B it releases the preceding destination;
231D69 calls the new destination's AddRef through vtable +4. Settings destruction
22E9FB checks +B0 and calls 22DADD(null) to release that ownership. Stream API
22E694 reaches the same path. Bounded native disassembly is preserved under
build/checks/audio-pops-20261018; analysis used no whole-image binary scan.

Both native output setters previously omitted those references. Releasing a
still-routed destination could therefore destroy it while sources continued.
Audio::release then cleared their routes, abruptly changing their gain/sends
and potentially producing a pop. The provider now retains/replaces/releases
outputs using the verified +B0 layout and the original reference count. Final
buffer and stream release also releases the output chain. Identical assignments
do not add references; the native routing graph rejects cycles before mutation.

Existing audio-binding diagnostics exercise the original AddRef, caller release
while routing, identical reassignment, replacement, chained destruction and
stream ownership. A constant PCM signal also checks that releasing the caller's
output reference leaves every mixed sample unchanged. The old provider fails
the new original/native reference-count check before the fix.

The stream output setter is not reached by the title's fixed native entry
table; its diagnostic invokes the verified provider binding directly. This
does not add or claim another translated game function. Stream AddRef also
checks the original +8 field, and clearing an output checks balanced ownership.

Release rebuild and existing diagnostics pass: 119 audio binding cases, 77
audio cases, 67 effects checks, 54 spatial cases with 1000 original calculations,
52 CPU groups and all twelve original WMA tracks. The 96000-frame frozen scene
matches its pre-change WAV byte for byte. Checks opened no playback device,
booted no game and ran no gameplay benchmark. No owned workers remain.

This fixes verified ownership errors capable of introducing a discontinuity.
The user's occasional audible event was not captured during this audit, so
manual gameplay listening is still needed to confirm that symptom is resolved.

Captured pop: remaining hardware settings path overwrites samples (2026-10-18)

User captures frame-218901963800 and frame-221535306300 cover 2.64 seconds of
the first title-screen driving demo. The user identifies the red car leaving a
bump, a couple of seconds after the first F8. The second capture contains 126720
live stereo frames at 48 kHz. Its 264 WASAPI callbacks deliver 480 frames each;
maximum callback time is 1.9675 ms and maximum start gap 10.0991 ms. No audio
failure is reported. The 8192-event trace is truncated and retains the final
approximately 1.46 seconds, so it is not a complete event replay of the interval.

The live mix has a 0.6959839 adjacent-sample jump at frame 109214 (2.275291667 s).
Isolating stereo Xbox ADPCM voice 30 from the first snapshot reproduces that
same sample position, with a raw source jump of 61436 PCM16 units. FFmpeg's
independent Xbox decoder gives 61438 at the same position; maximum difference
over the surrounding five blocks is six PCM16 units, consistent with decoder
rounding. The click precedes mixing, routing and effects processing.
Reference source: https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/adpcm.c
Xbox block layout: https://github.com/vgmstream/vgmstream/blob/master/src/coding/ima_decoder.c

Voice 30 binds guest 01163030 with 783000h bytes. Its play start is 5635840
frames, cursor 245888, rate 48000 and step 1. The fault is absolute source frame
5990942, block 93608, sample 30, encoded bank byte 6739776: guest 017D0770.
The captured block contains 32-bit effect parameters, including 00000250,
00000290, 00016BF0, 007FFFFF and FF800001, in place of ADPCM bytes.

A hardware write watch in an isolated executable copy catches the actual write:
title 10A5F0 -> public SetI3DL2Listener 22FA52 -> 22F7CA -> 22EFFD -> 2312C7
-> private SetEffectData 230B56 -> copy 236204. The copy submits 108h bytes
from guest 01061D50 to 017D0730, crossing the exact captured block. Its first
watched words are 250h, 290h, 16BF0h, 7FFFFFh. The public environment setter
was missing from native bindings, so it still reached the SDK's original
MCPX shadow-memory path. EnableHeadphones 22D776 also reached that path through
22C501/231239. This is another public entry into the overwrite mechanism
documented above on 2026-10-08; binding public SetEffectData alone was insufficient.

Both settings now have verified native boundaries. Environmental listener
parameters retain immediate/deferred behavior and update source adjustments.
The original software-only calculator 22D1B4 derives the reverb parameters in
Spatial's isolated scratch memory. Native commit writes the flag at effect +10h
and the 108h-byte parameter region at +118h to the real native DSP state.
The title's verified locations remain {reverb=2,crosstalk=4}. Headphone mode
clears crosstalk flag bit 1 and speaker mode sets it, matching original 231239,
while preserving unrelated DSP state. There is no sample repair, decoder change,
voice-specific mute or output filter. Optional capture events include both calls
and retain the environmental listener's 48 parameter bytes.

Audio binding checks now create the actual native device layout. They cover
unassigned reverb, both settings with/without an image, original deferred setter
layout, deferred commit visibility, updated DSP processing and preservation of
low guest RAM and a guarded 768-byte sound-bank range at 017D0618. With the
effects image beside the XBE, 142 binding cases pass; the existing 54 spatial,
77 audio, 67 effects, 52 CPU groups and all 12 original WMA tracks also pass.
The compiled function count remains 36149. A frozen scene's WAV remains byte
identical: old captures retain their already damaged samples, as expected.

The corrected isolated write-watch run reaches main, loads 57 buffers and five
effects, and completes its 200-million-checkpoint budget without the corrupt
write or an audio error. It uses SDL dummy audio, separate storage, no visible
game window and no gameplay benchmark. Owned debugger/game/build workers exit.
Evidence and native analysis stay under build/checks/audio-pop-capture-20261018.
A fresh game launch is required to load sound data without the overwrite.

Music volume and pause shortcuts (2026-10-19)

Verified the supported XBE hash above. XACT 210A7F sets streamed music volume
through 22D98A, whose original bytes E94FFBFFFF jump to 22D4DE. Its pause/resume
methods call 22D9A8 (E973F4FFFF -> 22CE20). Pitch 22D98F (E9F8FAFFFF -> 22D48C)
and headroom 22D9A3 (E97EFCFFFF -> 22D626) use the same SDK shortcut layout.
The game's music-volume handler C5C30 issues the XACT category-volume command
at C5D15; 20E659/213329/21275D propagate it through the original voice setter.

Function recovery follows these unconditional jumps and includes their targets.
Native binding selection checked only the recovered function's entry, leaving
the shortcut functions to execute original hardware setters. Those setters
changed guest descriptors without updating the native mixer. Both included B1
and imported WMA music use these streams. The offline binding reproduction
confirms a -20 dB request still outputs 0.1252968 instead of 0.01252968.

Lowering now recognizes an entry jump to an existing native API, verifies the
target's original signature and emits that native call under the original
shortcut entry. Volume, pitch, headroom and pause/resume retain their original
arguments and calling conventions. Existing audio binding checks exercise
audible attenuation, full mute, restoration, pause with a pending packet and
resume, alongside the existing asynchronous stop and stream-reuse checks.
Bounded original analysis and before/after results remain in
build/checks/music-controls-20261019.

Release rebuild and offline checks pass: 155 native audio binding cases,
54 spatial cases/1000 calculations, 77 audio cases, 67 effects checks,
all twelve original B1 WMA tracks, 252 custom-music cases with seven imported
songs, and 52 CPU groups. Mixed PCM is silent at the SDK's -10000 volume setting and during
pause; restoring volume and resuming the pending packet both restore sound.
The compiled function count remains 36149. No game session or audio device
was opened; the user will check the live Crash transition.

Sound balance audit (2026-10-26)

The user reports the same symptom with any car and any camera view. Focus the
audit on shared mixing, rather than introducing car/view-specific adjustments.

Reverified default.xbe against supported_target.json: SHA256
B5207C40C11D7C5B5E129EF555F7632FA3584A4240BD0421C2B1B9AD9BFED7BF.
Reviewed the latest recorded control correction (2026-10-19), the original
232FED speaker gain calculation, native source/FXIN routing, per-source and
mix-bin headroom, environmental sends and stereo folding. The latest control
fix restores music volume and pause through original SDK shortcuts; changing
music can change perceived masking, but does not retune engine or tire cues.
The earlier rear-speaker correction remains present. No sound-specific volume
override was found or added.

Existing Windows offline audio, effects and spatial checks pass, including 155
original/native audio-binding cases. Replayed three existing user captures
without opening a playback device or booting the game. Each replay uses 96000
stereo frames and excludes the captured master mute/volume. An ignored native
diagnostic then restores the same snapshot for the complete scene, the sources
routed through engine FXIN bin 14, and the remaining sources. Routing, original
gains, DSP parameters and history are retained; unselected source gains are
zeroed only in those diagnostic copies. Frozen controls and retained effect
tails mean these are comparisons, not independent recordings of each category.

Capture (date)              Scene RMS   Engine RMS  Other RMS   Clipped samples
frame-60548904000 (Oct 24)  0.15544331  0.08460542  0.12885813  0
frame-42550016600 (Oct 24)  0.10929511  0.03247569  0.10647113  0
frame-78219613421 (Oct 21)  0.10727907  0.03065522  0.10269341  0

All three category comparisons also have zero clipped output samples. Scene
peaks are 0.66594356, 0.47280600 and 0.94573190. The newest complete-scene WAV
matches the normal capture inspector byte for byte (SHA256
918A91187255B9DB8E88CA7F5D3EF4528A4DD1856AF9036A8F80D90EE43659CA).
The engine is 3.65, 10.31 and 10.50 dB below the remaining sources combined;
that is not a measurement of the tire/drifting cue by itself.
The newest frame is the title-screen driving demo; it does not establish the
reported drifting balance during a race. Diagnostic C++,
JSON and scene/engine/other-sfx WAVs stay under
build/checks/audio-balance-20261026; original captures remain unchanged.

No new balance defect is established by this evidence, so production gains
remain unchanged. Existing console HRTF approximations and the lack of an
identified drifting capture/reference prevent claiming audible balance parity.
A fresh F8 capture during the reported drift, plus a matched original reference
if available, would distinguish a tire-cue gain problem
from spatial placement or masking. No gameplay automation or benchmark ran.
