fix: enable audio capture

This commit is contained in:
2026-05-16 22:27:33 +02:00
parent fb889dcd71
commit 3279948e78

View File

@@ -584,8 +584,14 @@ impl ObsContext {
info!("[GAME_CAPTURE] Using 'Any' mode to capture fullscreen games...");
// Wrap source build in catch_unwind
// Enable capture_audio so the game capture source automatically creates
// an "Application Audio Capture" (WASAPI) source for the captured game.
let source_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
builder.set_capture_mode(ObsGameCaptureMode::Any).build()
builder
.set_capture_mode(ObsGameCaptureMode::Any)
.set_capture_audio(true)
.expect("[GAME_CAPTURE] Audio capture not available on this system")
.build()
}));
let source = match source_result {