mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:25:52 +01:00
[PR #1598] [MERGED] RT-SILENT-AUDIO-ENDPOINT: serve a silent output endpoint when the host has none (the boot's audio-lock stop) #1615
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1615
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1598
Author: @aslan2142
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:silent-audio-endpoint📝 Commits (2)
d4ce33eruntime: serve a silent output endpoint when the host has none018145bruntime: serve the spatial stream on the silent output endpoint📊 Changes
8 files changed (+2163 additions, -2 deletions)
View changed files
📝
docs/runtime_imports.md(+39 -0)📝
runtime/CMakeLists.txt(+18 -0)📝
runtime/README.md(+1 -0)📝
runtime/shims/com_shim.cpp(+7 -1)➕
runtime/shims/silent_audio.cpp(+1308 -0)➕
runtime/shims/silent_audio.h(+61 -0)➕
runtime/test/silent_audio_test.cpp(+728 -0)📝
scripts/build_runtime.ps1(+1 -1)📄 Description
Item:
RT-SILENT-AUDIO-ENDPOINT. The claim could not be posted: coordination issue #14 is at GitHub's 2,500-comment limit and has no successor yet. The claim text, to be copied there once there is one:Searched first: no claim or open pull request covers this.
What and why
On a host with no audio output, the title's
GetDefaultAudioEndpoint(eRender)returns0x80070490. Its audio device start then takes an error path that leaves its output-device lock held, and the audio engine never mixes. A main-thread command buffer fills up, and the boot stops on anint3about 47 s in. Refusing the enumerator altogether gives the same stop. A console always has an output.Measured on the retail boot first, without code:
CoCreateInstance(MMDeviceEnumerator)now goes toshims/silent_audio.cpp(hooked inshims/com_shim.cpp).LEONIDA_AUDIO=silent, render questions get an in-process endpoint that never opens a host device and throws every sample away. It serves:ISpatialAudioClient/2, which is what the title activates: a 7.1 static bed, mono 48 kHz float objects, and an event every 10 ms;IAudioClient/2/3with render client, clock and volume services.[rt]line names the reason.runtime/README.md, and the behaviour indocs/runtime_imports.md("Audio output off the console (WASAPI)").Tests
silent_audio_test: 129 checks, using stand-in hosts, so no host audio is touched. It covers the enumerator with no endpoint, with one and with none at all; forced mode; event-driven, polled and spatial streams running on their clock; and the hook withLEONIDA_AUDIO=silent.main'scom_shim.cpp, the hook checks fail.silent_audiois new and passes on both.test_docs_env_vars,test_docs_links,test_docs_repo_paths,test_ci_registrationandtest_ctest_registrationpass.Measured on the retail boot
Wine, no audio driver at all, RDNA2 iGPU; counts only. Measured with #1539 merged locally, since RADV loses the device without it. It is not needed to build or merge this.
mainint3LEONIDA_AUDIO=silentAI-assisted (Claude Code, Claude Opus 5.5).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.