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):
params[i] = -1
while 1:
time.millisleep(100)
time.sleep(0.1)
old = params[:]
al.getparams(dev, params)
if params <> old:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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