xgameruntime_offline: one silent speech voice with WAVE streams, display power requests for timeout deferrals (RT-GDK-SPEECH-DISPLAY-LIFECYCLE) #401
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!401
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/401/head"
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?
@Andretuta on GitHub · 2026-11-24 04:43 UTC · original
ubiquitarianism:feat/gdk-speech-display-lifecycle→main· +195 −57 · 3 files · 4 commits · merged 2026-11-24 13:44 UTCClaimed in the coordination issue as:
RT-GDK-SPEECH-DISPLAY-LIFECYCLE(#14)Split after review: this PR keeps the speech and launcher stubs. The lifecycle callback and
CreateWindowExhook are now in #769, andXAppCaptureImplis left to #537, which serves it with its full layout.What and why
XAccessibilityImplspeech (runtime/shims/xgameruntime_offline.cpp), consistent now:XSpeechSynthesizerEnumerateInstalledVoicescalls back once with one silent voice (leonida-silent,en-US), using theXSpeechSynthesizerVoiceInformationlayout of the GDK reference (Description,DisplayName,Gender,VoiceId,Language).XSpeechSynthesizerCreatehands out a synthesizer that speaks with it.SetCustomVoiceaccepts that voice id only. Streams from text and SSML return a valid 44-byte RIFF/WAVE header (16 kHz, 16-bit mono PCM, no samples), so a title that plays narration reads a silent stream.XSpeechSynthesizerEnumerateInstalledVoices(void* context, callback).mainread them the other way round, so a null context was refused withE_INVALIDARG.XLauncherImpl:XDisplayAcquireTimeoutDeferralcreates a Win32PowerCreateRequest/PowerSetRequest(PowerRequestDisplayRequired)request and returns its handle;XDisplayCloseTimeoutDeferralHandleclears and closes it. Side effect on the host: while the title holds a deferral, Windows keeps the PC's display on.XLaunchUristill fails (E_FAIL).docs/runtime_imports.md: the speech and launcher bullets match the code. The served-classes table and its paragraph are left alone, because #537 rewrites them; the two merge cleanly.Tested
xgameruntime_offline_test(69 checks, 0 failures) andxgameruntime_testpass under CTest. New checks: the enumeration passes its context back and reports one voice;SetCustomVoiceaccepts the enumerated id and refuses another id or null.test_gdk_runtime_callsand build-script pytest: 81 passed.GPUs tested: n/a (CPU-only GDK runtime tests)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a — runtime shims only)🤖 Generated with Claude Code
- Implement silent 44-byte 16 kHz mono 16-bit PCM WAVE streams for XSpeechSynthesizer in XAccessibilityImpl. - Back XLauncherImpl::XDisplayAcquireTimeoutDeferral / Close with Win32 PowerCreateRequest / PowerSetRequest(PowerRequestDisplayRequired). - Add offline XAppCaptureImpl stub returning ERROR_NOT_SUPPORTED. - Add runtime/shims/lifecycle.{h,cpp} providing app-state notification registration and CreateWindowExA/W oversized-window fitting plus suspend-on-SC_CLOSE dispatch.@ubiquitarianism on GitHub · 2026-11-24 04:51 UTC · original
Holding. Please split this into separate PRs (one topic per PR): the speech, capture and launcher stubs in one, and the lifecycle callback and
CreateWindowExhook in another. For the speech stubs:docs/runtime_imports.md, which still says Create fails (lines 452-453, 487-542).For the hook:
api-ms-win-core-psm-appnotifyand kernelbase;Drop 'Depends on #357' if it's unused.
@tengotengo on GitHub · 2026-11-24 09:59 UTC · original
Coordination note from the RT-XAPPCAPTURE claim (#14): open pull request #537 also serves XAppCaptureImpl, and both pull requests update runtime/test/xgameruntime_test.cpp, tests/test_gdk_runtime_calls.py and docs/runtime_imports.md. If both merge, class a4f1aee2-4bf1-4485-b008-a7c26d52ac27 is served by two objects (one per xgameruntime*.cpp file), and the shared test/doc files conflict on whichever merges second.
The difference: #537's layout was measured against the retail executable - it queries that class id for IXAppCaptureImpl4 and calls slot 5 (XAppCaptureTakeScreenshot), the executable's one thunk of the class; #537 serves the full 18-slot layout answering the class id and the v1-v4 interface ids, every method E_NOTIMPL offline. With it, all 158 thunks the executable references are served (the data point reported in #14).
Proposal: drop the XAppCaptureImpl part from this pull request (the speech, display and lifecycle work has no overlap), or rebase this one after #537 lands and remove the duplicate class object plus its test/doc updates. Happy to discuss on the Discord if easier.