Display -inf when volume/gain controls are at zero/off

This commit is contained in:
Geoffrey D. Bennett
2023-12-04 13:28:17 +10:30
parent 770ce1cc23
commit 20c4ff5559
4 changed files with 28 additions and 11 deletions

View File

@@ -174,7 +174,7 @@ static void create_input_gain_control(
int current_row,
int line_num
) {
GtkWidget *w = make_gain_alsa_elem(elem);
GtkWidget *w = make_gain_alsa_elem(elem, 0);
gtk_grid_attach(GTK_GRID(grid), w, line_num, current_row, 1, 1);
}
@@ -466,7 +466,7 @@ static void create_output_controls(
// output controls
if (strncmp(elem->name, "Line", 4) == 0) {
if (strstr(elem->name, "Playback Volume")) {
w = make_gain_alsa_elem(elem);
w = make_gain_alsa_elem(elem, 1);
gtk_grid_attach(
GTK_GRID(output_grid), w, line_num - 1 + line_1_col, 1, 1, 1
);
@@ -503,7 +503,7 @@ static void create_output_controls(
GtkWidget *l = gtk_label_new(gen4 ? "Line 12" : "HW");
gtk_grid_attach(GTK_GRID(output_grid), l, 0, 0, 1, 1);
w = make_gain_alsa_elem(elem);
w = make_gain_alsa_elem(elem, 1);
gtk_widget_set_tooltip_text(
w,
gen4
@@ -522,7 +522,7 @@ static void create_output_controls(
"This control shows the setting of the headphone volume knob."
);
gtk_grid_attach(GTK_GRID(output_grid), l, 1, 0, 1, 1);
w = make_gain_alsa_elem(elem);
w = make_gain_alsa_elem(elem, 1);
gtk_grid_attach(GTK_GRID(output_grid), w, 1, 1, 1, 1);
} else if (strcmp(elem->name, "Mute Playback Switch") == 0) {
w = make_boolean_alsa_elem(