runtime: inventory audio imports and add an ApuAlloc caller fixture #940
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/947"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-23T18:14:35Z.
Refs #870. This covers the audio slice from the 17:39Z note: an inventory of the unresolved audio-side imports, plus one source-built caller. It adds no production
chad/xapu/acphalbinding.Inventory (
docs/experiments.md, "Audio-side import inventory")There are 19 unresolved imports:
chad.dllhas 5XDsp*,xapu.dllhas 5XApu*, andacphal.dllhas 3AcpHal*and 6Apu*.ApuAllocandApuFree. The source is MIT call sites in microsoft/DirectXTK12 atf3555e3(SoundEffect.cpp,WaveBankReader.cpp,SoundStreamInstance.cpp). These establish anHRESULTreturn, avoid**output, a second pointer-sized argument that every call site passes asnullptr(type not public), aUINT32size, an alignment constant (value and width not public), andApuFree(void*)with a discarded result.f8c3438confirms that theXDsp*/XApu*functions are documented APIs, but it gives no signatures.ApuCreateHeapappears only in a DirectXTK12 diagnostic. No desktop counterpart is known for the stream, command-queue or SHAPE-context interfaces.Caller
tests/cpu/apu_alloc_caller.asmimportsApuAlloc/ApuFreefromacphal.dllby name.tests/cpu/apu_alloc_provider.cppis a test-only recording provider with a 64 KiB arena. Its policy (arena size,E_OUTOFMEMORY, output untouched on failure, release returns the space) is labelled proposed desktop policy.E_OUTOFMEMORYand leaves the sentinel output untouched.ApuFree. The caller checks its own provider counts and exits0x8A0.0x8A0(Windows loader with and without a live worker, andpe_map). The mapped run records sizes[0x1000, 0x20000, 0x10000, 0x10000], alignment0x800and results[S_OK, E_OUTOFMEMORY, E_OUTOFMEMORY, S_OK].APU_TEST_LENIENT) makes the caller stop at the refusal step (0xF02) under both loaders.pe_mapbefore entry (unresolved import acphal.dll!ApuAlloc/!ApuFree) with no recorded calls.Not established: the console error codes, the meaning of the second argument, the alignment width, the heap size, and any ordering relative to
ApuCreateHeap.Tested
Commit
f14e3f6(rebased on1c13def). Windows 10 Pro 10.0.19045.6466, MSVC 19.44 x64 (VS 2022 Build Tools), CMake/Ninja. I usedINTAKE_PYTHONfrom arequirements-dev.txtvenv and built the fixture targets in each preset:ctest --preset dev -R '^cpu_native_apu_alloc_caller$'ctest --preset release -R '^cpu_native_apu_alloc_caller$'tests/docs_links_check.pytests/bidi_controls_check.pytests/hardware_reports_check.pyNo capability skips. The full suite was not run, because this change only adds new targets and one test.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T18:33:11Z.
I resolved the CMake and experiment-notes conflicts with #935. The Windows Release run passed both cpu_native_apu_alloc_caller and cpu_native_transfer_mem. The APU fixture catches the lenient provider under both loaders, and withholding either export leaves the trace empty before entry. I also checked the pinned DirectXTK12 call sites. They support the partial call shape documented here. The test-provider policies and the other audio interfaces remain open.