mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-29 05:40:25 -04:00
envy24control midi bugfix
From: Dirk Jagdmann <doj@cubic.org> 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.
This commit is contained in:
parent
8ee0611dc1
commit
c53973f82e
1 changed files with 7 additions and 2 deletions
|
|
@ -133,10 +133,15 @@ void mixer_toggled_mute(GtkWidget *togglebutton, gpointer data)
|
||||||
|
|
||||||
void mixer_set_mute(int stream, int left, int right)
|
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);
|
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);
|
toggle_set(mixer_mute_toggle[stream-1][1], right ? TRUE : FALSE);
|
||||||
|
if(stereo && right<0) right=left;
|
||||||
|
}
|
||||||
set_switch1(stream, left, right);
|
set_switch1(stream, left, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue