feat(xaudio2): forward X3DAudio and the XAudio2FX reverb and volume-meter factories to the host #40
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Freminet--ScarlettX!40
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-40"
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?
@wildheathen on GitHub · 2026-11-21 19:28 UTC · original
wildheathen:feat/xaudio2-x3daudio-fx→main· +212 −11 · 4 files · 2 commits · openSummary
Titles import
X3DAudioInitialize/X3DAudioCalculateand the XAudio2FX factories from the same DLL as XAudio2, soxaudio2_9.dllnow exports them and forwards each to the host's ownXAudio2_9.dll, the wayXAudio2Createalready works:X3DAudioInitialize(UINT32 SpeakerChannelMask, FLOAT32 SpeedOfSound, X3DAUDIO_HANDLE)andX3DAudioCalculate(...).CreateAudioReverb(void** ppApo)andCreateAudioVolumeMeter(void** ppApo): the factories behind the inlineXAudio2CreateReverb/XAudio2CreateVolumeMeterwrappers. Forwarding hands the title the host's real XAPO (reference counting,IXAPO,IXAPOParametersand the DSP are the host's), so nothing about the effect is reimplemented.Details:
System32by full path.LoadLibraryW("XAudio2_9.dll")would find our own shim.E_FAIL(X3DAudioCalculatedoes nothing); a null output pointer on a factory isE_POINTER.XAudio2Createused is factored out so the factories can use it too..deffile because<x3daudio.h>already declares them.Tests
tests/test_xaudio2.cpp(Windows): an emitter to the right of the listener gives the right channel more volume; each factory returns an object that answersIXAPOandIXAPOParameters, rejects an unknown IID withE_NOINTERFACE, releases to zero, and returnsE_POINTERfor a null output. The checks skip with a message when the host has noXAudio2_9.dll.Verification
origin/main(test_boot_hello_scarlett,test_boot_rt_showcase,test_d3d12_guest_texture; see #1 and #2).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.