Repository navigation
Audio Video and Input
OpenScarlett implements clean-room translations for Xbox Series X|S's audio engine (XAudio2_9, AcpHal, XMA2/Opus/ADPCM), hardware video playback (mfplat_xs, Bink2Scarlett), and unified controller/keyboard/mouse API (GameInput).
Source: src/shims/xaudio2_shim.cpp, src/shims/acphal_shim.cpp, src/audio/xma2_decoder.cpp, src/audio/opus_adpcm_decoder.cpp
-
128+ Concurrent Source Voices: Lock-free audio mixer upgraded in Sprint 12 (
test_s12_os_loader_gameinput) with monotonic sample clocks (SamplesPlayed), looping buffers, pitch/frequency ratio resampling, and volume matrix routing. -
Submix Buses & Audio Processing Objects (APOs): Full submix graph, Schroeder Reverb APO (
XAudio2CreateReverb), and VolumeMeter APO (XAudio2CreateVolumeMeter) viaXAudio2FX. -
3D Spatial Audio (
X3DAudio):X3DAudioInitializeandX3DAudioCalculatewith live Doppler pitch shift verified onSimpleLighting(1.066 → 0.942). -
WASAPI Live Output + Null Headless Mode: Streams real-time mixed PCM audio to Windows WASAPI on desktop PCs, and cleanly switches to a deterministic null sink when
OPENSCARLETT_AUDIO_NULL=1is set (used in headless CI runners).
| Component | Capabilities | Verified In |
|---|---|---|
AcpHal.dll |
Console Audio Co-Processor (SHAPE) DSP context/queue shim forwarding XMA2 packets directly to OpenScarlett's software decoder |
test_codecs, test_audio_opus_wasapi
|
XMA2 Decoder (xma2_decoder.cpp) |
Clean-room IMDCT-based XMA2 packet/frame decoder | test_codecs |
Opus & ADPCM (opus_adpcm_decoder.cpp) |
Integrates Windows MSOpusDecoder Media Foundation Transform (MFT) for low-latency Opus playback + IMA/MS-ADPCM decoding |
test_audio_opus_wasapi, test_dstorage_audio_diag_parity
|
Source: src/shims/mfplat_shim.cpp, src/middleware/bink2_decoder.cpp, src/shims/bink2_scarlett_shim.cpp
- Implements
IMFDXGIDeviceManager(MFResetDXGIDeviceManagerX) andIMFMediaEnginelifecycle for console video cutscenes. - Translates H.264 and HEVC decode pipelines to native Windows D3D12 Media Foundation with
TransferVideoFrametexture output and a deterministic headless fallback for CI environments without hardware video codecs (test_media_video_gameinput). - Companion registration shims (
mfhevcdec.dll,mflnmhelp.dll) ensure Media Foundation decoder discovery never fails on boot.
- Clean-room KB2i DCT multi-frame video streaming decoder and Xbox Bink2 C ABI exports (
test_codecs,test_media_video_gameinput). - (Note: Full commercial retail Bink2 bitstream variants are still in progress.)
Source: include/openscarlett/input/gameinput_abi.h, src/shims/gameinput_shim.cpp
Xbox Series X|S titles use Microsoft's modern IGameInput unified reading API instead of legacy XInput-only polling. OpenScarlett's GameInput.dll provides:
-
Unified Device Support:
-
Gamepads: Native XInput controller polling mapped to
GameInputGamepadState(all buttons, triggers, and thumbsticks) -
Keyboard: Full Win32 virtual-key / scancode mapping to
GameInputKeyState -
Mouse: Lossless Win32 Raw Input relative delta accumulation (
WM_INPUT) mapped toGameInputMouseState(test_s7_pe_gdk_runtime,test_s12_os_loader_gameinput)
-
Gamepads: Native XInput controller polling mapped to
-
Hot-Plug Device Callbacks:
RegisterDeviceCallback/UnregisterCallbacksupporting dynamic controller connect/disconnect notifications with deterministic reading ring buffers (test_media_video_gameinput). -
Haptics & Impulse Triggers:
SetRumbleStatetranslates both main low/high-frequency motor rumble and Xbox One/Series LT/RT impulse-trigger feedback rings. -
Verified Live Playability: Drives interactive 60 FPS gameplay in Freedoom: Phase 1 (
ScarlettDoom), ScarlettArena, and camera-controlledgdk_3d_scene.
OpenScarlett — Clean-room MIT Xbox Series X|S translation layer for Windows 10 & 11 x64 · Repository · Dashboard · Discord · Strictly no retail DRM decryption or key extraction.
User & Build Guides
Architecture & Subsystems
- Architecture Overview
- Loader & Virtual Filesystem
- Graphics: D3D12 & Vulkan 1.4
- RDNA2 Lifter & Ray Tracing
- Memory, Streaming & Storage
- Audio, Video & Input
Reference & Diagnostics
Community