Add configurable taper to GtkDial

The taper was previously set to a log function which matched the
Clarett volume knob. Add linear option to match the Scarlett 4th Gen
input gain knobs and hardware level meters.
This commit is contained in:
Geoffrey D. Bennett
2024-01-17 16:03:56 +10:30
parent 189b9ff6f6
commit 492c348897
7 changed files with 83 additions and 8 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, 0);
GtkWidget *w = make_gain_alsa_elem(elem, 0, WIDGET_GAIN_TAPER_LINEAR);
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, 1);
w = make_gain_alsa_elem(elem, 1, WIDGET_GAIN_TAPER_LOG);
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, 1);
w = make_gain_alsa_elem(elem, 1, WIDGET_GAIN_TAPER_LOG);
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, 1);
w = make_gain_alsa_elem(elem, 1, WIDGET_GAIN_TAPER_LOG);
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(