Repository navigation
fix: 核心功能修复:Steam Streaming Microphone 统一双声道 32-bit 48 kHz,修复安装后音频爆炸 - #399
Merged
OrientCOMPASS merged 4 commits intoNov 21, 2026
Merged
OrientCOMPASS merged 4 commits into
OrientCOMPASS merged 4 commits into
Conversation
Valve's driver ships with a multichannel render endpoint, a +30 dB capture boost and render/capture formats that can disagree. A default install ended up with a 48 kHz 16-bit render side and a 44.1 kHz 32-bit capture side, which makes the loopback resampler produce extremely loud artifacts. configure.ps1 now sets both endpoints to stereo 24-bit 48 kHz, disables the exclusive-mode policy through the endpoint property store, and verifies the result after cycling AudioEndpointBuilder. The format change is skipped for an endpoint that already has the target format (SetDeviceFormat returns E_ACCESSDENIED for a no-op). The output engine gains a 24-bit path because WASAPI reports the new endpoint format as I24, and the in-app repair check now requires stereo instead of accepting the old mono endpoint.
The Steam Streaming Microphone WaveCyclic driver copies raw bytes between its render and capture streams: it performs no channel, bit-depth or sample-rate conversion, so both streams must hand the driver identical byte geometry. A 24-bit packed endpoint is ambiguous because the Windows mix format is a 32-bit container with 24 valid bits; the engine can pick 24-bit (3-byte) for one stream and 32-bit (4-byte) for the other, which the raw ring then misreads as the periodic explosion users reported after a default install. 16-bit and 32-bit endpoints are unambiguous and loop back cleanly. Configure both endpoints as stereo 48 kHz 32-bit PCM instead, matching MicYou's stereo 48 kHz F32LE DSP chain, keep 24-bit source material lossless, and keep exclusive mode disabled. Verified on the Steam driver: 24-bit endpoints reproduce the deterministic 9 kHz/23 kHz explosion, while the 32-bit configuration loops a 1 kHz tone back at the correct level and frequency across repeated runs, and configure.ps1 is idempotent.
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.
问题
PR #394 将 Windows 虚拟麦克风切换为 Valve 的 Steam Streaming Microphone 后,默认安装下会出现严重的音频爆炸。实测与逆向确认根因:
CopyTo/CopyFrom只按字节搬运,不做声道、位深、采样率转换。修复
configure.ps1将 Steam Streaming Microphone 的 render/capture 两个端点统一配置为 2ch / 48 kHz / 32-bit PCM,对齐 MicYou 的双声道 48 kHz F32LE DSP 链,24-bit 源素材无损;同时保持 capture 增益 0 dB、关闭独占模式,并做幂等校验。engine.rs更新 2 声道/48 kHz 检测与告警文案,并删除已不再使用的 I24 输出路径(32-bit 端点的 mix 是 F32,旧的 24-bit packed 路径既无必要也不安全)。.github/workflows/web-client.yml。验证
configure.ps1,自动修正为双端 2ch/48k/32-bit;重复执行幂等,exit 0。影响
tauri-app/src-tauri/resources/steam-audio/configure.ps1tauri-app/crates/micyou-audio/src/engine.rstauri-app/crates/micyou-core/src/platform/steam_audio.rstauri-app/src-tauri/installer.issAGENTS.md、README*.md、resources/steam-audio/README.md.github/workflows/web-client.yml(删除)行为变化:不再使用 24-bit packed 端点(无法保证稳定),改为 32-bit 容器;Sound 面板会显示 32-bit,但 24-bit 源音频无损,且与 F32LE DSP 链一致。