Skip to content

Commit b7e215a

Browse files
committed
linux-pulseaudio: Store in source settings 'default_device_id'
This stores the 'default_device_id' after creation of the pulseaudio output capture source. Signed-off-by: pkv <[email protected]>
1 parent ae98311 commit b7e215a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugins/linux-pulseaudio/pulse-input.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,13 @@ static void pulse_server_info(pa_context *c, const pa_server_info *i, void *user
250250
bfree(monitor);
251251
}
252252
}
253-
253+
if (!data->input && data->source) {
254+
obs_data_t *s = obs_source_get_settings(data->source);
255+
if (s) {
256+
obs_data_set_string(s, "default_device_id", i->default_sink_name);
257+
obs_data_release(s);
258+
}
259+
}
254260
pulse_signal(0);
255261
}
256262

0 commit comments

Comments
 (0)