envycontrol/: port from GTK2 to GTK3

This commit is contained in:
genBTC 2025-03-06 18:59:46 -05:00
parent 64b836ed26
commit 60f1430882
12 changed files with 553 additions and 422 deletions

View file

@ -105,9 +105,6 @@ int envy_analog_volume_available(void)
}
/*
*/
void dac_volume_update(int idx)
{
snd_ctl_elem_value_t *val;
@ -210,14 +207,12 @@ void adc_sense_update(int idx)
}
/*
*/
void dac_volume_adjust(GtkAdjustment *adj, gpointer data)
{
int idx = (int)(long)data;
snd_ctl_elem_value_t *val;
int err, ival = -(int)adj->value;
double adjustment_value = gtk_adjustment_get_value(adj);
int err, ival = -(int)adjustment_value;
char text[16];
snd_ctl_elem_value_alloca(&val);
@ -235,7 +230,8 @@ void adc_volume_adjust(GtkAdjustment *adj, gpointer data)
{
int idx = (int)(long)data;
snd_ctl_elem_value_t *val;
int err, ival = -(int)adj->value;
double adjustment_value = gtk_adjustment_get_value(adj);
int err, ival = -(int)adjustment_value;
char text[16];
snd_ctl_elem_value_alloca(&val);
@ -253,7 +249,8 @@ void ipga_volume_adjust(GtkAdjustment *adj, gpointer data)
{
int idx = (int)(long)data;
snd_ctl_elem_value_t *val;
int err, ival = -(int)adj->value;
double adjustment_value = gtk_adjustment_get_value(adj);
int err, ival = -(int)adjustment_value;
char text[16];
snd_ctl_elem_value_alloca(&val);
@ -299,9 +296,6 @@ void adc_sense_toggled(GtkWidget *togglebutton, gpointer data)
g_print("Unable to write adc sense: %s\n", snd_strerror(err));
}
/*
*/
void analog_volume_init(void)
{
snd_ctl_elem_info_t *info;