|
4 | 4 |
|
5 | 5 | dev = AL.DEFAULT_DEVICE |
6 | 6 |
|
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 | | - ] |
14 | 7 | source_name = ['line', 'microphone', 'digital'] |
15 | 8 |
|
16 | 9 | params = al.queryparams(dev) |
|
23 | 16 | if params <> old: |
24 | 17 | for i in range(0, len(params), 2): |
25 | 18 | if params[i+1] <> old[i+1]: |
26 | | - name = parameter_name[params[i]] |
| 19 | + name = al.getname(dev, params[i]) |
27 | 20 | if params[i] == AL.INPUT_SOURCE: |
28 | 21 | if 0 <= old[i+1] < len(source_name): |
29 | 22 | oldval = source_name[old[i+1]] |
|
33 | 26 | else: |
34 | 27 | oldval = `old[i+1]` |
35 | 28 | newval = `params[i+1]` |
36 | | - print string.ljust(name, 20), |
| 29 | + print string.ljust(name, 25), |
37 | 30 | print '(' + string.rjust(oldval, 10) + ')', |
38 | 31 | print '-->', |
39 | 32 | print string.rjust(newval, 10) |
|
0 commit comments