From: Robert Jacobs <rnjac...@mit.edu>

---
 AlsaMixer.app/AMixer/AChannel.cc | 3 +++
 AlsaMixer.app/Mixer.cc           | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/AlsaMixer.app/AMixer/AChannel.cc b/AlsaMixer.app/AMixer/AChannel.cc
index 81df656..745bf08 100644
--- a/AlsaMixer.app/AMixer/AChannel.cc
+++ b/AlsaMixer.app/AMixer/AChannel.cc
@@ -35,6 +35,9 @@ void AChannel::setVolume(long value) {
 bool AChannel::isMuted() {
   int val;
 
+  if (!snd_mixer_selem_has_playback_switch(aItem->aElem)) {
+         return (false); /* can't be muted? isn't muted. */
+  }
   snd_mixer_selem_get_playback_switch(aItem->aElem, (SNDCHID_T) id, &val);
 
   return (! (bool) val);
diff --git a/AlsaMixer.app/Mixer.cc b/AlsaMixer.app/Mixer.cc
index b982413..66ebe6e 100644
--- a/AlsaMixer.app/Mixer.cc
+++ b/AlsaMixer.app/Mixer.cc
@@ -464,8 +464,8 @@ void Mixer::setVolume(int button, int volume)
 
 void Mixer::toggleMute(int button)
 {
-  mVolumeMute[button] = !mVolumeMute[button];
   aMixer->itemToggleMute(button);
+  mVolumeMute[button] = aMixer->itemIsMuted(button);
   setButtonType(button);
 }
 
-- 
2.1.0


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to