[PR #401] [MERGED] xgameruntime_offline: one silent speech voice with WAVE streams, display power requests for timeout deferrals (RT-GDK-SPEECH-DISPLAY-LIFECYCLE) #450

Closed
opened 2026-11-26 20:17:55 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/401
Author: @Andretuta
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: feat/gdk-speech-display-lifecycle


📝 Commits (4)

  • 43c4f10 xgameruntime/lifecycle: speech WAV stream, display power request, XAppCapture, suspend-on-close
  • 82dcf6d Merge remote-tracking branch 'ubiq/main' into feat/gdk-speech-display-lifecycle
  • a02134a lifecycle: hook only the title window, end through ExitProcess, fix unregister race
  • d7354f2 xgameruntime_offline: one silent voice, drop XAppCaptureImpl and the lifecycle shim (#401 review)

📊 Changes

3 files changed (+195 additions, -57 deletions)

View changed files

📝 docs/runtime_imports.md (+17 -8)
📝 runtime/shims/xgameruntime_offline.cpp (+111 -33)
📝 runtime/test/xgameruntime_offline_test.cpp (+67 -16)

📄 Description

Claimed in the coordination issue as: RT-GDK-SPEECH-DISPLAY-LIFECYCLE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121796272)

Split after review: this PR keeps the speech and launcher stubs. The lifecycle callback and CreateWindowEx hook are now in #769, and XAppCaptureImpl is left to #537, which serves it with its full layout.

What and why

  • XAccessibilityImpl speech (runtime/shims/xgameruntime_offline.cpp), consistent now: XSpeechSynthesizerEnumerateInstalledVoices calls back once with one silent voice (leonida-silent, en-US), using the XSpeechSynthesizerVoiceInformation layout of the GDK reference (Description, DisplayName, Gender, VoiceId, Language). XSpeechSynthesizerCreate hands out a synthesizer that speaks with it. SetCustomVoice accepts 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.
  • Argument order fixed: the GDK reference gives XSpeechSynthesizerEnumerateInstalledVoices(void* context, callback). main read them the other way round, so a null context was refused with E_INVALIDARG.
  • XLauncherImpl: XDisplayAcquireTimeoutDeferral creates a Win32 PowerCreateRequest / PowerSetRequest(PowerRequestDisplayRequired) request and returns its handle; XDisplayCloseTimeoutDeferralHandle clears and closes it. Side effect on the host: while the title holds a deferral, Windows keeps the PC's display on. XLaunchUri still 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

  • MSVC 14.44 / Windows SDK 10.0.26100: xgameruntime_offline_test (69 checks, 0 failures) and xgameruntime_test pass under CTest. New checks: the enumeration passes its context back and reports one voice; SetCustomVoice accepts the enumerated id and refuses another id or null.
  • Merged with #537 in a scratch tree: both tests pass, no conflict.
  • Docs, test_gdk_runtime_calls and build-script pytest: 81 passed.

GPUs tested: n/a (CPU-only GDK runtime tests)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — runtime shims only)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/401 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `feat/gdk-speech-display-lifecycle` --- ### 📝 Commits (4) - [`43c4f10`](https://github.com/ubiquitarianism/leonida/commit/43c4f104c904e1036af0b10295a1677f62c3f205) xgameruntime/lifecycle: speech WAV stream, display power request, XAppCapture, suspend-on-close - [`82dcf6d`](https://github.com/ubiquitarianism/leonida/commit/82dcf6dedc56bddc189b455f6498e679ecbb4fd6) Merge remote-tracking branch 'ubiq/main' into feat/gdk-speech-display-lifecycle - [`a02134a`](https://github.com/ubiquitarianism/leonida/commit/a02134a9c60af52b8e0c6bdc6e2fa2bad72e7e75) lifecycle: hook only the title window, end through ExitProcess, fix unregister race - [`d7354f2`](https://github.com/ubiquitarianism/leonida/commit/d7354f2b91de2917ba6639a053b9fe7cb82a5d23) xgameruntime_offline: one silent voice, drop XAppCaptureImpl and the lifecycle shim (#401 review) ### 📊 Changes **3 files changed** (+195 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `docs/runtime_imports.md` (+17 -8) 📝 `runtime/shims/xgameruntime_offline.cpp` (+111 -33) 📝 `runtime/test/xgameruntime_offline_test.cpp` (+67 -16) </details> ### 📄 Description Claimed in the coordination issue as: `RT-GDK-SPEECH-DISPLAY-LIFECYCLE` (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121796272) Split after review: this PR keeps the speech and launcher stubs. The lifecycle callback and `CreateWindowEx` hook are now in #769, and `XAppCaptureImpl` is left to #537, which serves it with its full layout. ### What and why - **`XAccessibilityImpl` speech (`runtime/shims/xgameruntime_offline.cpp`), consistent now:** `XSpeechSynthesizerEnumerateInstalledVoices` calls back once with one silent voice (`leonida-silent`, `en-US`), using the `XSpeechSynthesizerVoiceInformation` layout of the GDK reference (`Description`, `DisplayName`, `Gender`, `VoiceId`, `Language`). `XSpeechSynthesizerCreate` hands out a synthesizer that speaks with it. `SetCustomVoice` accepts 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. - **Argument order fixed:** the GDK reference gives `XSpeechSynthesizerEnumerateInstalledVoices(void* context, callback)`. `main` read them the other way round, so a null context was refused with `E_INVALIDARG`. - **`XLauncherImpl`:** `XDisplayAcquireTimeoutDeferral` creates a Win32 `PowerCreateRequest` / `PowerSetRequest(PowerRequestDisplayRequired)` request and returns its handle; `XDisplayCloseTimeoutDeferralHandle` clears and closes it. **Side effect on the host:** while the title holds a deferral, Windows keeps the PC's display on. `XLaunchUri` still 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 - MSVC 14.44 / Windows SDK 10.0.26100: `xgameruntime_offline_test` (69 checks, 0 failures) and `xgameruntime_test` pass under CTest. New checks: the enumeration passes its context back and reports one voice; `SetCustomVoice` accepts the enumerated id and refuses another id or null. - Merged with #537 in a scratch tree: both tests pass, no conflict. - Docs, `test_gdk_runtime_calls` and build-script pytest: 81 passed. GPUs tested: n/a (CPU-only GDK runtime tests) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a — runtime shims only) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:55 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#450
No description provided.