From c53973f82ecd8ae1564e1e757ff218541e8cb0d4 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 27 Jul 2005 06:47:08 +0000 Subject: [PATCH] envy24control midi bugfix From: Dirk Jagdmann this patch is a bugfix for the midi patch I posted yesterday. This patch fixes the "mute" button when driven via midi and the "LR Gang" button is set. --- envy24control/mixer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/envy24control/mixer.c b/envy24control/mixer.c index 7951be0..48c33a9 100644 --- a/envy24control/mixer.c +++ b/envy24control/mixer.c @@ -133,10 +133,15 @@ void mixer_toggled_mute(GtkWidget *togglebutton, gpointer data) void mixer_set_mute(int stream, int left, int right) { - if (left >= 0) + int stereo = is_active(mixer_stereo_toggle[stream-1]) ? 1 : 0; + if (left >= 0 || stereo) { toggle_set(mixer_mute_toggle[stream-1][0], left ? TRUE : FALSE); - if (right >= 0) + if(stereo && left<0) left=right; + } + if (right >= 0 || stereo) { toggle_set(mixer_mute_toggle[stream-1][1], right ? TRUE : FALSE); + if(stereo && right<0) right=left; + } set_switch1(stream, left, right); } -- 2.47.1