From ecef9b6d60675bd8db68f4d58837178801b867b9 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 7 Jan 2005 17:17:41 +0000 Subject: [PATCH] Fix digital mixer checkboxes Fix by Dirk Jagdmann : The digital mixer can routed only to HW1/2 or SPDIF1/2. In other channels, the checkbox shouldn't appear. --- envy24control/envy24control.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/envy24control/envy24control.c b/envy24control/envy24control.c index 324f453..49d7581 100644 --- a/envy24control/envy24control.c +++ b/envy24control/envy24control.c @@ -464,7 +464,10 @@ static void create_router_frame(GtkWidget *box, int stream, int pos) label = gtk_label_new(""); gtk_widget_show(label); - if(stream <= MAX_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS) { + /* the digital mixer can only be routed to HW1/2 or SPDIF1/2 */ + if( (stream <= 2) /* hw1/2 */ || + ((stream > MAX_OUTPUT_CHANNELS) && (stream <= MAX_OUTPUT_CHANNELS + 2)) /* spdif1/2 */ + ) { radiobutton = gtk_radio_button_new_with_label(group, stream & 1 ? "Digital Mix L" : "Digital Mix R"); router_radio[stream-1][1] = radiobutton; group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); -- 2.47.1