Zeal Ranked Voice v2 -- native Windows follow-up, 2026-10-12
============================================================

This follows voice-integration-20261012/REPORT.txt. Its earlier build hashes
and results remain historical evidence. This pass adds genuine Windows WASAPI
capture/playback, device recovery and a Windows participant in the 4v4 test.

Implemented device fixes
------------------------
The prior playback-only fallback never retried a missing microphone. Recovery
now prepares a replacement asynchronously while keeping incoming voice alive.
Muted/deafened/inactive sessions cancel a pending capture replacement, and
captured samples retained during preparation are discarded before adoption.
RTP timestamps remain monotonic across replacements.

Each device's Windows COM context, stream initialization and cleanup stay on
one owner thread. Windows endpoint callbacks only flag relevant changes; they
never block or stop/reopen a stream. Default input/output follows the OS default,
while explicit device selections remain pinned. The media worker detects both
endpoint invalidation and a stopped stream instead of trusting a connected
network status to imply working audio.

The codec/mixing worker registers with Windows MMCSS's Audio task and requests
HIGH relative priority. It retains its ordinary priority fallback if the service
is unavailable. This does not modify system registry scheduling policy or
change the bounded 30 ms output queue. zv_stats reports MMCSS registration.

API references:
https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-couninitialize
https://learn.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nn-mmdeviceapi-immnotificationclient
https://learn.microsoft.com/en-us/windows/win32/procthread/multimedia-class-scheduler-service

Native Windows device evidence
-------------------------------
The Windows 11 VM was temporarily given emulated HDA microphone/output and a
USB output, all routed exclusively to private virtual audio devices. Generated
espeak-ng speech and distinct tones were the only input. No human microphone
was opened or recorded. This exercises native Windows WASAPI, not Wine's
implementation, but does not qualify physical USB/headset drivers.

Starting Ranked without an enabled microphone preserved incoming audio across
background retries, without new playback underruns. Enabling the mic resumed
capture automatically; live disable/re-enable also passed. The harness observed
the first recovery within 6.714 seconds including endpoint control and polling.
The implementation retry interval is two seconds, not a hard recovery deadline.
The fallback had one initialization underrun before measurements; it did not
recur while listening during retries.

Switching the default output to the emulated HDA device and then the USB device
passed actual two-way audio checks. A microphone endpoint verified at 44,100 Hz
also passed; Windows shared-mode conversion presented the 48 kHz voice stream.
Both directions had exact sender/receiver packet counts, zero new rejections,
zero capture-ring drops and zero playback underruns during each recording.
Speech-envelope correlations were 0.9515, 0.9684 and 0.9350 respectively. These
are signal/transport checks, not perceptual quality scores. Device checks used
DLL 368f51da3833eb3bd04f61bb7009b838367926c060edb6ce8a63ca1af5721c20;
the subsequent DLL changes multimedia scheduling and its diagnostic flag.

Shutdown diagnosis
-------------------
IW4x launched with its optional -console flag stalled in upstream Console.cpp
joining ConsoleRunner's GetMessage thread. A thread stack capture identified
that wait; the voice engine was sleeping normally with its device released.
Waking the debug-console thread allowed shutdown to finish. The native test
then used the ordinary launch path without -console; leave released legacy
capture suppression and the process exited in the next observation (~2 s).
No guessed game offsets or changes to the upstream debug console were made.

Eight-client stress check
--------------------------
The first mixed native/Wine run heard exactly the correct three teammates in
all eight recordings and preserved both duos. All network packets reached the
expected recipients. The native VM recorded two additional 10 ms playback-ring
underruns; the seven Wine clients recorded none. This triggered the MMCSS change.
The first harness also needed a shorter QA display name because the game's
name limit truncated its numeric suffix; readiness resumed after correcting
only the harness identity mapping.

The MMCSS repeat had no new output underruns. It did expose pauses and capture
overruns in the shared virtual-audio test rig. Every encrypted media packet
still reached its expected recipients; some arrived too late for playout and
were rejected by the jitter timing check. The VM's software renderer then raised
an access violation in d3d10warp, confirmed by its exception record. Voice
threads were still running. The QA client was restarted with single-threaded
rendering and no MSAA, and the seven background clients were capped at 30 FPS.
The native Windows client retained 60 FPS. These are QA graphics settings.
The host was also observed reverting the VM to its reduced process priority;
normal-priority adjustment was therefore not treated as a lasting fix.

Final eight-player result
--------------------------
Two duos plus four solos entered the isolated Rust/Domination pool. Seven
players stayed in warmup; eight loaded players with actual class selections
started 4v4. One native Windows 11 game plus seven Windows game binaries through
Wine used the same final DLL and isolated generated audio sources.

All eight recordings contained exactly their three real teammates. Both duos
stayed together. The 30-second simultaneous-tone run sent 24,274 media packets
and delivered 72,822 recipient packets, exactly three recipients per sender.
Every client had zero new packet rejections, zero capture-ring drops and zero
output underruns during the measurement. Each receiver recorded precisely its
three initial stream resets. Concealment counters include activation/tail gaps
and are not a measured network loss rate. Actual input/output rates were 48 kHz;
MMCSS registration was reported on the native Windows client.

F7 opened the native voice settings in the Windows match (screenshot included).
Legacy voice counted zero sent/received frames while Ranked owned audio;
cl_voice remained enabled, preserving the player's original preference.

Final DLL SHA256:
ccdadb38ce8a4db591849ac7d3b0fc2f920c1febd78acdafff25ed4581a8a670
Menu IWD SHA256:
7405baa98bea5da2cd042abe4eefd7809d87dd92538bd36187bb7bcd0121ad24
Installer 1.20 SHA256:
ef5652b066149c65fb69069a10c1d6f4d6b29225a5529260e01aa2fa5ac60578

Three CTest groups passed on Windows x86 and Linux. The 32 Python tests in
voice_service, voice_http, ranked_lobby and ranked_profile passed. Earlier
broader integration, cryptographic, loss/burst and clock-drift test details are
retained in voice-integration-20261012. Installer 1.20 passed the native Windows
resource/hash, license, backup-preservation and repeated-install checks.

The final DLL is installed in the local shared game and MS-02's normal game.
All five normal services are active; normal ratings equal the original snapshot.
The update required no normal pool, rules, lobby credentials or database changes.
The ordinary menu/voice endpoint is still the MS-02 LAN pool. Public VPS/TLS
endpoints await the actual deployment addresses.

Complete match and transition
------------------------------
Three actual players captured the DOM objectives under normal rules; no endgame
or rating result was forced. The match reached 200-0, and the rating service
committed all eight results with a net Elo change of zero. This used the isolated
QA database, never normal player ratings. The pool continued into the next
warmup/match cycle with duos retained. Generated two-way audio across that
transition delivered 1,356/1,356 tone packets and 1,212/1,212 speech packets with
zero new rejections, capture drops or output underruns. Its speech-envelope
correlation was 0.9512. The fixture's original label was post-match-party; the
actual observed channel was the pool's next game transition, not a manually
reopened frontend party. The report uses the corrected transition label.

The final Windows game left Ranked, released legacy capture suppression and
exited completely. Its original player configuration was restored; the matched
normal-pool DLL, menu and both license files remain installed in G:\IW4X.
The temporary scheduled control task was removed. The VM was powered off and
its original persistent XML restored before restarting: the temporary HDA/USB
sound devices and private audio connection are absent in both live/persistent
configuration. Private virtual-audio processes were stopped afterwards.

All background Wine clients were stopped, their original profiles restored,
and their DLL symlinks/menu copies updated. The visible client's profile was
not changed. The five isolated voiceqa services and three temporary proxy
ports were stopped/removed. The five normal MS-02 services remain active.

Rollback copies for this follow-up:
  Local: iw4x-eight-client-qa/evidence/voice-before-windows-20261012
  MS-02: /root/qa-state/voice-windows-20261012/before
The previous complete pre-voice rollback and v3.5/v3.6 bundles are preserved.
The new v3.7 test bundle contains installer 1.20, matching DLL/menu/licenses,
project source, complete corresponding native source and a SHA256 manifest.
No public release, GitHub push or VPS provisioning was performed.

Qualification limits
---------------------
These tests establish the implemented native Windows audio path, authenticated
LAN routing, party/team/settings integration and documented device recovery.
They do not certify Discord-equivalent perceived quality, a physical headset's
driver behavior, acoustic echo cancellation, WAN latency or public VPS capacity.
Use real Windows headsets and a human side-by-side listening test before making
an equal-or-better-clarity claim. Noise reduction remains optional; headphones
avoid speaker echo. Public hosting still requires the configured HTTPS and
voice UDP endpoints described in ../../VOICE.txt.


