Commit aa0adcaa authored by Hui Wang's avatar Hui Wang Committed by Robert Ancell
Browse files

sound: clear the value on level_bar when stream is empty

We met an Input Device level_bar display issue on a machine which has
no internal mic. At first there is no external mic plugged, so the
Input Device list is empty and level_bar is gray color, after we plug
an external mic, the level_bar has red color ripples, then we unplug
the external mic, the Input Device list changes to empty and we
expect the level_bar changes back to gray color, but some bars are
still red color.

Here clear the self->value to 0 if the stream is empty, then the
level_bar will change back to gray color when Input/Output device
list is empty.

Signed-off-by: Hui Wang's avatarHui Wang <>
parent 4cd8c05e
Pipeline #355133 passed with stages
in 8 minutes and 21 seconds
......@@ -242,6 +242,7 @@ cc_level_bar_set_stream (CcLevelBar *self,
if (stream == NULL)
self->value = 0.0;
gtk_widget_queue_draw (GTK_WIDGET (self));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment