Repository navigation
feat(hle): add silent spatial-audio fallback endpoint and held durations for VICTORY_KEYS - #405
Open
gdemontalivet wants to merge 1 commit into
Open
gdemontalivet wants to merge 1 commit into
gdemontalivet wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small quality-of-life gaps affect headless Macs, CI runners, and unattended test runs:
IMMDeviceEnumerator::GetDefaultAudioEndpoint(eRender, ...)fails withE_NOTFOUND, stalling audio initialization; during automated A/B runs on desktop Macs, there is also no switch to keep title audio timing active without playing sound through the host speakers.VICTORY_KEYS: feat(input): VICTORY_KEYS in release builds, for unattended runs past the title's prompts #285 enabledVICTORY_KEYSin release builds with a fixed200 mstap per entry, whereas some input prompts require holding a key or button down for several seconds (for example6:Enter:2.5).What changed
ISpatialAudioClientfallback endpoint (crates/victory-hle/src/modules/audio/silent.rs,audio.rs,docs/macos.md):IMMDeviceEnumeratorreturned byCoCreateInstanceso systems with a working render endpoint continue to use native host audio unchanged unlessVICTORY_SILENT_AUDIO=1is set.GetDefaultAudioEndpointreturnsE_NOTFOUNDorVICTORY_SILENT_AUDIO=1is set, return a COM-counted silent renderIMMDeviceimplementingIAudioClient/IAudioClient3,IAudioRenderClient,IAudioClock,IPropertyStore, andISpatialAudioClient/ISpatialAudioObjectRenderStream(48 kHz stereo IEEE float, 10 ms period timer signaling the client's render event so the audio engine's clock and mixing thread advance at real-time cadence without host audio output).VICTORY_KEYS(crates/victory-hle/src/modules/gameinput.rs):VICTORY_KEYSsyntax in all builds toVICTORY_KEYS=<at_seconds>:<key>[:<hold_seconds>],..., keeping0.2seconds as the default when:<hold_seconds>is omitted and rejecting zero, negative, non-finite, or malformed durations.How it was tested
cargo test --workspace(native macOS): all passed (0failed).victory-hle --libunder Wine (--test-threads=1):audio(18/18) andgameinput(11/11) tests passed, covering host-endpoint passthrough, missing-endpoint fallback,VICTORY_SILENT_AUDIO=1override, COM reference counting, 48 kHz render-event pacing, and tap/holdVICTORY_KEYSparsing.cargo xtask policy,git diff --check, andcargo clippy --workspace --all-targets --target x86_64-pc-windows-gnullvm -- -D warnings(with and without--features diagnostics): clean. All test inputs are synthetic.