VR: headset audio output and headset microphone while VR is on (switch back on exit) #1122

Open
opened 2026-10-26 20:57:11 +00:00 by sky_line · 0 comments
Owner

Part of the VR epic #1072. Owner, 2026-10-26: when the headset is on, play the viewer's audio through the headset, and use the headset's microphone for speech-to-text (#1118, #1119).

Today: world audio is OpenAL opened on the system default device (alcOpenDevice(NULL), llaudioengine_openal.cpp:130) with no device choice and no switching while running. Voice has its own VoiceInputAudioDevice / VoiceOutputAudioDevice. Media (CEF / VLC / GStreamer plugins) plays on the system default.

Finding the headset's devices: OpenXR has no portable way to name the headset's audio devices (only vendor extensions such as XR_OCULUS_audio_device_guid on Windows). So:

  • match known headset devices by name (Valve Index: its DisplayPort audio sink and the "Valve VR Radio & HMD Mic" USB mic; Quest Link / Virtual Desktop / WMR names on Windows), use the vendor extension where the runtime offers it;
  • a setting in Preferences (VR section): headset output / mic device, "Automatic" by default, with the detected devices listed;
  • log what was detected and chosen.

Switching:

  • VR session starts -> world audio (OpenAL), voice output and media move to the headset output; dictation (#1118/#1119) and voice input use the headset mic. Session ends -> everything goes back to the user's desktop devices. Settings are never rewritten.
  • OpenAL: open the chosen device by name, and move live without dropping sounds (ALC_SOFT_reopen_device if available, else a controlled engine restart). Check what the shipped OpenAL Soft supports.
  • Media plugins: decide per platform (PipeWire/Pulse stream move on Linux; Windows per-app default or the plugin's own device option) -- may be a follow-up.
  • If SteamVR's own "switch audio device when SteamVR runs" already moves the system default, Automatic should notice and not fight it.

VR hard rule: with VR off nothing changes: same default device, no device enumeration at startup beyond what exists today.

Test: desktop speakers + Index: start VR -> world sounds, voice and a media prim play in the headset; dictation uses the headset mic (check the log's chosen capture device); quit VR -> audio returns to the speakers without restarting the viewer.

Part of the VR epic #1072. Owner, 2026-10-26: when the headset is on, play the viewer's audio through the headset, and use the headset's microphone for speech-to-text (#1118, #1119). **Today:** world audio is OpenAL opened on the system default device (`alcOpenDevice(NULL)`, llaudioengine_openal.cpp:130) with no device choice and no switching while running. Voice has its own `VoiceInputAudioDevice` / `VoiceOutputAudioDevice`. Media (CEF / VLC / GStreamer plugins) plays on the system default. **Finding the headset's devices:** OpenXR has no portable way to name the headset's audio devices (only vendor extensions such as `XR_OCULUS_audio_device_guid` on Windows). So: - match known headset devices by name (Valve Index: its DisplayPort audio sink and the "Valve VR Radio & HMD Mic" USB mic; Quest Link / Virtual Desktop / WMR names on Windows), use the vendor extension where the runtime offers it; - a setting in Preferences (VR section): headset output / mic device, "Automatic" by default, with the detected devices listed; - log what was detected and chosen. **Switching:** - VR session starts -> world audio (OpenAL), voice output and media move to the headset output; dictation (#1118/#1119) and voice input use the headset mic. Session ends -> everything goes back to the user's desktop devices. Settings are never rewritten. - OpenAL: open the chosen device by name, and move live without dropping sounds (ALC_SOFT_reopen_device if available, else a controlled engine restart). Check what the shipped OpenAL Soft supports. - Media plugins: decide per platform (PipeWire/Pulse stream move on Linux; Windows per-app default or the plugin's own device option) -- may be a follow-up. - If SteamVR's own "switch audio device when SteamVR runs" already moves the system default, Automatic should notice and not fight it. **VR hard rule:** with VR off nothing changes: same default device, no device enumeration at startup beyond what exists today. **Test:** desktop speakers + Index: start VR -> world sounds, voice and a media prim play in the headset; dictation uses the headset mic (check the log's chosen capture device); quit VR -> audio returns to the speakers without restarting the viewer.
sky_line added this to the Slipstream project 2026-10-26 20:57:11 +00:00
Sign in to join this conversation.
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
sky_line/Slipstream#1122
No description provided.