summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-12-14 15:06:05 (GMT)
committerGuido van Rossum <guido@python.org>1992-12-14 15:06:05 (GMT)
commit57fc52578f8301aee4f1c5e920e21316e9af8964 (patch)
tree9f0dfc50f4d887357c5ff7847822805652ec041d /Demo
parenta8413b2ef00525b7f47cab1f5882ee7c0b2e9877 (diff)
downloadcpython-57fc52578f8301aee4f1c5e920e21316e9af8964.zip
cpython-57fc52578f8301aee4f1c5e920e21316e9af8964.tar.gz
cpython-57fc52578f8301aee4f1c5e920e21316e9af8964.tar.bz2
Get official parameter names
Diffstat (limited to 'Demo')
-rwxr-xr-xDemo/sgi/al/alwatch.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/Demo/sgi/al/alwatch.py b/Demo/sgi/al/alwatch.py
index ac53080..4a52ab2 100755
--- a/Demo/sgi/al/alwatch.py
+++ b/Demo/sgi/al/alwatch.py
@@ -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)