micro changes
This commit is contained in:
parent
46e4b07a81
commit
50519c6190
|
@ -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:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /ufs/guido/bin/sgi/python
|
||||
#! /usr/local/bin/python
|
||||
|
||||
# broadcast [port]
|
||||
#
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /ufs/guido/bin/sgi/python
|
||||
#! /usr/local/bin/python
|
||||
|
||||
# radio [port]
|
||||
#
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /ufs/guido/bin/sgi/python
|
||||
#! /usr/local/bin/python
|
||||
|
||||
# unicast host [port]
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue