]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Get official parameter names
authorGuido van Rossum <guido@python.org>
Mon, 14 Dec 1992 15:06:05 +0000 (15:06 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 14 Dec 1992 15:06:05 +0000 (15:06 +0000)
Demo/sgi/al/alwatch.py

index ac53080a2d817792dd8cd4454257086d696347b7..4a52ab22fa7d4cb016536ae9a0a288b3618d64d1 100755 (executable)
@@ -4,13 +4,6 @@ import string
 
 dev = AL.DEFAULT_DEVICE
 
-parameter_name = [ \
-       'input source', 'left input atten', 'right input atten', \
-       'input rate', 'output rate', \
-       'left speaker gain', 'right speaker gain', \
-       'input count', 'output count', 'unused count', \
-       'sync input to aes', 'sync output to aes', \
-       ]
 source_name = ['line', 'microphone', 'digital']
 
 params = al.queryparams(dev)
@@ -23,7 +16,7 @@ while 1:
        if params <> old:
                for i in range(0, len(params), 2):
                        if params[i+1] <> old[i+1]:
-                               name = parameter_name[params[i]]
+                               name = al.getname(dev, params[i])
                                if params[i] == AL.INPUT_SOURCE:
                                        if 0 <= old[i+1] < len(source_name):
                                                oldval = source_name[old[i+1]]
@@ -33,7 +26,7 @@ while 1:
                                else:
                                        oldval = `old[i+1]`
                                        newval = `params[i+1]`
-                               print string.ljust(name, 20),
+                               print string.ljust(name, 25),
                                print '(' + string.rjust(oldval, 10) + ')',
                                print '-->',
                                print string.rjust(newval, 10)