mirror of
https://github.com/sal063/AC6_recomp
synced 2026-08-22 15:11:33 -04:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user