micro changes

This commit is contained in:
Guido van Rossum 1994-10-07 10:23:49 +00:00
parent 46e4b07a81
commit 50519c6190
8 changed files with 10 additions and 11 deletions

View File

@ -10,7 +10,7 @@ params = al.queryparams(dev)
for i in range(1, len(params), 2): for i in range(1, len(params), 2):
params[i] = -1 params[i] = -1
while 1: while 1:
time.millisleep(100) time.sleep(0.1)
old = params[:] old = params[:]
al.getparams(dev, params) al.getparams(dev, params)
if params <> old: if params <> old:

View File

@ -1,4 +1,4 @@
#! /ufs/guido/bin/sgi/python #! /usr/local/bin/python
# broadcast [port] # broadcast [port]
# #

View File

@ -17,8 +17,8 @@ import AL
import audioop import audioop
import sys import sys
class Cmpaf(): class Cmpaf:
def init(self): def __init__(self):
parsetree = flp.parse_form('cmpaf_form','form') parsetree = flp.parse_form('cmpaf_form','form')
flp.create_full_form(self, parsetree) flp.create_full_form(self, parsetree)
c = al.newconfig() c = al.newconfig()
@ -29,7 +29,6 @@ class Cmpaf():
self.do_adpcm = self.do_ulaw = self.do_diff = 0 self.do_adpcm = self.do_ulaw = self.do_diff = 0
self.acstate = None self.acstate = None
self.form.show_form(FL.PLACE_SIZE, 1, 'compare audio formats') self.form.show_form(FL.PLACE_SIZE, 1, 'compare audio formats')
return self
def run(self): def run(self):
while 1: while 1:
@ -61,5 +60,5 @@ class Cmpaf():
def cb_diff(self, obj, val): def cb_diff(self, obj, val):
self.do_diff = obj.get_button() self.do_diff = obj.get_button()
cmpaf = Cmpaf().init() cmpaf = Cmpaf()
cmpaf.run() cmpaf.run()

View File

@ -49,6 +49,6 @@ def makeport(nchannels, sampwidth, samprate):
def play(p, data, offset, blocksize): def play(p, data, offset, blocksize):
data = data[offset:] data = data[offset:]
p.writesamps(data) p.writesamps(data)
while p.getfilled() > 0: time.millisleep(10) while p.getfilled() > 0: time.sleep(0.01)
main() main()

View File

@ -43,7 +43,7 @@ def main():
if not buf: break if not buf: break
port.writesamps(buf) port.writesamps(buf)
while port.getfilled() > 0: while port.getfilled() > 0:
time.millisleep(100) time.sleep(0.1)
try: try:
main() main()

View File

@ -1,4 +1,4 @@
#! /ufs/guido/bin/sgi/python #! /usr/local/bin/python
# radio [port] # radio [port]
# #

View File

@ -20,7 +20,7 @@ def playit (buf) :
print 'playing...' print 'playing...'
p.writesamps(buf) p.writesamps(buf)
while p.getfilled() > 0: while p.getfilled() > 0:
time.millisleep(10) time.sleep(0.01)
print 'done.' print 'done.'
p.closeport() p.closeport()

View File

@ -1,4 +1,4 @@
#! /ufs/guido/bin/sgi/python #! /usr/local/bin/python
# unicast host [port] # unicast host [port]
# #