Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2009-09-03 19:51:37 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2009-09-03 19:51:37 (GMT)
commitd6f7a8c7e9a5831bbb6f83f56ff8f3f4bf119ce2 (patch)
tree172d55e85256dba5ec3713b3f3883fe3ee6573aa
parent915bb53ecdcada625ee865472e98a0539590e001 (diff)
exception added for mix-gain inconsistancy
-rwxr-xr-xaudiograb.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/audiograb.py b/audiograb.py
index b169d0f..259b159 100755
--- a/audiograb.py
+++ b/audiograb.py
@@ -394,7 +394,11 @@ class AudioGrab():
p = p[find(p,"Mono:"):]
p = p[find(p,"[")+1:]
p = p[:find(p,"%]")]
- return int(p)
+ try:
+ return int(p)
+ except:
+ # in case alsamixer doesn't report a percentage
+ return 0
def set_sampling_rate(self, sr):
"""Sets the sampling rate of the capture device