- Change device order in autodetect. Prevents a possible crash.
- Fix segfault in waveedit when deleting end of waveform. - Comply with new python guidelines
This commit is contained in:
parent
84f8c8135b
commit
dc60e66eb5
3 changed files with 88 additions and 4 deletions
42
aldrin-firstdev.patch
Normal file
42
aldrin-firstdev.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
diff -rupN aldrin.old/src/components/driver.py aldrin/src/components/driver.py
|
||||
--- aldrin.old/src/components/driver.py 2009-01-09 16:25:22.000000000 -0500
|
||||
+++ aldrin/src/components/driver.py 2010-03-06 04:32:27.000000000 -0500
|
||||
@@ -155,22 +155,33 @@ class AudioDriver:
|
||||
|
||||
# second round: if we didnt find them from the config,
|
||||
# pick good alternatives.
|
||||
+
|
||||
+ # regardless of what was chosen as input, if output
|
||||
+ # has an input as well, prefer that one first.
|
||||
+ # We also prefer the first device since it is usually the
|
||||
+ # default system device. Unfortunately, the armstrong api
|
||||
+ # does not provide us a default value.
|
||||
+ if (output == -1 and input == -1):
|
||||
+ for i in range(self.driver.get_count()):
|
||||
+ if (self.driver.is_output(i) and self.driver.is_input(i)):
|
||||
+ output = i
|
||||
+ input = i
|
||||
+ break
|
||||
|
||||
if output == -1:
|
||||
for i in range(self.driver.get_count()):
|
||||
if self.driver.is_output(i):
|
||||
output = i
|
||||
-
|
||||
- # regardless of what was chosen as input, if output
|
||||
- # has an input as well, prefer that one first.
|
||||
- if self.driver.is_input(output):
|
||||
- input = output
|
||||
+ break
|
||||
|
||||
# take output channel if it supports input
|
||||
if input == -1:
|
||||
for i in range(self.driver.get_count()):
|
||||
if self.driver.is_input(i):
|
||||
input = i
|
||||
+ break
|
||||
+ if self.driver.is_input(output):
|
||||
+ input = output
|
||||
|
||||
if output == -1:
|
||||
raise self.AudioInitException
|
||||
Reference in a new issue