Skip to content

Commit

Permalink
mac-capture: Don't read channels for disconnected audio device
Browse files Browse the repository at this point in the history
Co-authored-by: PatTheMav <patthemav+github@gmail.com>
  • Loading branch information
2 people authored and RytoEX committed Nov 8, 2024
1 parent b854f61 commit 7979421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/mac-capture/mac-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ static obs_properties_t *coreaudio_properties(bool input, void *data)
property = obs_properties_add_bool(props, "enable_downmix", obs_module_text("CoreAudio.Downmix"));
obs_property_set_modified_callback2(property, coreaudio_downmix_changed, ca);

if (ca != NULL) {
if (ca != NULL && ca->au_initialized) {
uint32_t channels = get_audio_channels(ca->speakers);
ensure_output_channels_visible(props, ca, channels);

Expand Down

0 comments on commit 7979421

Please sign in to comment.