Tag the WASAPI render stream GameEffects so media apps stop muting the game

Windows auto-mutes AudioCategory_GameMedia render streams whenever a Store media app (Screenbox, Windows' modern Media Player) plays music. Our single WASAPI stream carries the entire premixed game output, so the whole game fell silent. GameEffects is the category Windows games run as by default..
This commit is contained in:
Dipshet
2026-08-06 18:29:44 +02:00
parent 201a4038ea
commit cf6000c0f6
@@ -295,7 +295,12 @@ void WasapiAudioDriver::RenderThreadMain() {
if (SUCCEEDED(hr) && audio_client2) {
AudioClientProperties properties = {};
properties.cbSize = sizeof(properties);
properties.eCategory = AudioCategory_GameMedia;
// GameEffects, not GameMedia: this single stream carries the entire
// premixed game output (SFX, dialogue, AND music — nuSound2 mixes
// guest-side). GameMedia is for a dedicated background-music substream
// and Windows auto-mutes it while a media app (Screenbox, modern Media
// Player) has an active music session.
properties.eCategory = AudioCategory_GameEffects;
properties.Options = AUDCLNT_STREAMOPTIONS_NONE;
audio_client2->SetClientProperties(&properties);
}