Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 57fc525

Browse files
committed
Get official parameter names
1 parent a8413b2 commit 57fc525

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

Demo/sgi/al/alwatch.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44

55
dev = AL.DEFAULT_DEVICE
66

7-
parameter_name = [ \
8-
'input source', 'left input atten', 'right input atten', \
9-
'input rate', 'output rate', \
10-
'left speaker gain', 'right speaker gain', \
11-
'input count', 'output count', 'unused count', \
12-
'sync input to aes', 'sync output to aes', \
13-
]
147
source_name = ['line', 'microphone', 'digital']
158

169
params = al.queryparams(dev)
@@ -23,7 +16,7 @@
2316
if params <> old:
2417
for i in range(0, len(params), 2):
2518
if params[i+1] <> old[i+1]:
26-
name = parameter_name[params[i]]
19+
name = al.getname(dev, params[i])
2720
if params[i] == AL.INPUT_SOURCE:
2821
if 0 <= old[i+1] < len(source_name):
2922
oldval = source_name[old[i+1]]
@@ -33,7 +26,7 @@
3326
else:
3427
oldval = `old[i+1]`
3528
newval = `params[i+1]`
36-
print string.ljust(name, 20),
29+
print string.ljust(name, 25),
3730
print '(' + string.rjust(oldval, 10) + ')',
3831
print '-->',
3932
print string.rjust(newval, 10)

0 commit comments

Comments
 (0)