From 23a3b81bfd480e5a1d63bbad91e2b611b99758e1 Mon Sep 17 00:00:00 2001 From: Martin Perner Date: Tue, 30 Aug 2011 16:38:04 +0200 Subject: catch alsa exception on decibel acquire This closes #17. For some reasons the alsa interface does not provide a dB value on all systems. Instead an error is returned. The alsa-mixer library checks for such return values and throws an exception if one is detected. This patch catches the exception and returns 0 as dB value. --- xmobar.cabal | 1 + 1 file changed, 1 insertion(+) (limited to 'xmobar.cabal') diff --git a/xmobar.cabal b/xmobar.cabal index ecafe1d..5d77997 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -122,6 +122,7 @@ executable xmobar if flag(with_alsa) || flag(all_extensions) build-depends: alsa-mixer == 0.1.* + build-depends: alsa-core == 0.5.* other-modules: Plugins.Monitors.Volume cpp-options: -DALSA -- cgit v1.2.3