sound: Set input/output meter stream to NULL when there's no active device

When there's no active input or output device, the input/output meter shouldn't
have a stream set, so call set_input_stream() with a NULL stream
(cc_volume_slider_set_stream() and cc_level_bar_set_stream() are already handling
NULL as expected) in case there's no active input or output device.

This fixes a bug where the input/output meter doesn't get updated when the active
input or output device gets unset.
This commit is contained in:
Jonas Dreßler 2024-03-07 13:42:28 +01:00 committed by Felipe Borges
parent afec106a8b
commit 3aeb837cb0

View file

@ -174,8 +174,8 @@ output_device_update_cb (CcSoundPanel *self,
if (device)
stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device);
if (stream != NULL)
set_output_stream (self, stream);
set_output_stream (self, stream);
}
static void
@ -202,8 +202,8 @@ input_device_update_cb (CcSoundPanel *self,
if (device)
stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device);
if (stream != NULL)
set_input_stream (self, stream);
set_input_stream (self, stream);
}
static void