audio: retain WASAPI clients only after initialization (#807)

## Link to GitHub Issue or related Pull Request, if one exists
Fixes #782 

## Description of change

This addresses an issue only seen on Linux + WINE.

Defer retaining WASAPI clients until `Initialize` succeeds.

Before this PR, temporary clients created during DirectShow device
capability probing were retained as active audio clients, causing
Wine/Linux crashes in DDR and popn.

Also covers IAudioClient3, dummy, ASIO, WaveOut, and null-device
initialization paths, for consistency.

## Testing
WIP
This commit is contained in:
bicarus
2026-07-18 03:09:37 -07:00
committed by GitHub
parent c080bbe301
commit 61a0220c1a
6 changed files with 51 additions and 25 deletions
+2
View File
@@ -14,4 +14,6 @@ namespace hooks::audio {
extern std::mutex INITIALIZE_LOCK;
extern bool VOLUME_HOOK_ENABLED;
extern LowLatencyAudioClient *LOW_LATENCY_CLIENT;
void set_active_client(IAudioClient *client, const char *source);
}