diff --git a/audiograb.py b/audiograb.py
index 801bf62..366d3b9 100644
a
|
b
|
class AudioGrab_XO_1(AudioGrab): |
292 | 292 | p = p[find(p,"Front Left:"):] |
293 | 293 | p = p[find(p,"[")+1:] |
294 | 294 | p = p[:find(p,"%]")] |
295 | | return int(p) |
| 295 | try: |
| 296 | return int(p) |
| 297 | except: |
| 298 | # in case alsamixer doesn't report a percentage |
| 299 | return 0 |
296 | 300 | |
297 | 301 | def get_mix_for_recording(self): |
298 | 302 | """Returns True if Mix is set as recording device and False if it |
… |
… |
class AudioGrab_XO_1(AudioGrab): |
410 | 414 | p = p[find(p,"Front Left:"):] |
411 | 415 | p = p[find(p,"[")+1:] |
412 | 416 | p = p[:find(p,"%]")] |
413 | | return int(p) |
| 417 | try: |
| 418 | return int(p) |
| 419 | except: |
| 420 | # in case alsamixer doesn't report a percentage |
| 421 | return 0 |
414 | 422 | |
415 | 423 | |
416 | 424 | def set_PCM_gain(self, PCM_val): |
… |
… |
class AudioGrab_XO_1(AudioGrab): |
427 | 435 | p = p[find(p,"Front Left:"):] |
428 | 436 | p = p[find(p,"[")+1:] |
429 | 437 | p = p[:find(p,"%]")] |
430 | | return int(p) |
| 438 | try: |
| 439 | return int(p) |
| 440 | except: |
| 441 | # in case alsamixer doesn't report a percentage |
| 442 | return 0 |
431 | 443 | |
432 | 444 | def set_mic_gain(self, mic_val): |
433 | 445 | """Sets the MIC gain slider settings |