From 50519c619057a91ddeda18eb105b29bab4810ed9 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 7 Oct 1994 10:23:49 +0000 Subject: [PATCH] micro changes --- Demo/sgi/al/alwatch.py | 2 +- Demo/sgi/al/broadcast.py | 2 +- Demo/sgi/al/cmpaf.py | 7 +++---- Demo/sgi/al/playaiff.py | 2 +- Demo/sgi/al/playold.py | 2 +- Demo/sgi/al/radio.py | 2 +- Demo/sgi/al/rec_play.py | 2 +- Demo/sgi/al/unicast.py | 2 +- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Demo/sgi/al/alwatch.py b/Demo/sgi/al/alwatch.py index 4a52ab22fa7..da747d4d81c 100755 --- a/Demo/sgi/al/alwatch.py +++ b/Demo/sgi/al/alwatch.py @@ -10,7 +10,7 @@ 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: diff --git a/Demo/sgi/al/broadcast.py b/Demo/sgi/al/broadcast.py index 5ee96560f83..ce4875e1fc4 100755 --- a/Demo/sgi/al/broadcast.py +++ b/Demo/sgi/al/broadcast.py @@ -1,4 +1,4 @@ -#! /ufs/guido/bin/sgi/python +#! /usr/local/bin/python # broadcast [port] # diff --git a/Demo/sgi/al/cmpaf.py b/Demo/sgi/al/cmpaf.py index 509f0aad18a..6b91e30fd6c 100755 --- a/Demo/sgi/al/cmpaf.py +++ b/Demo/sgi/al/cmpaf.py @@ -17,8 +17,8 @@ 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 @@ def init(self): 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 @@ def cb_ulaw(self, obj, val): def cb_diff(self, obj, val): self.do_diff = obj.get_button() -cmpaf = Cmpaf().init() +cmpaf = Cmpaf() cmpaf.run() diff --git a/Demo/sgi/al/playaiff.py b/Demo/sgi/al/playaiff.py index 756748deb7b..22120dc66ca 100755 --- a/Demo/sgi/al/playaiff.py +++ b/Demo/sgi/al/playaiff.py @@ -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() diff --git a/Demo/sgi/al/playold.py b/Demo/sgi/al/playold.py index d0cb59268af..9792c168c5d 100755 --- a/Demo/sgi/al/playold.py +++ b/Demo/sgi/al/playold.py @@ -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() diff --git a/Demo/sgi/al/radio.py b/Demo/sgi/al/radio.py index 6cde805c38f..a6f6809187c 100755 --- a/Demo/sgi/al/radio.py +++ b/Demo/sgi/al/radio.py @@ -1,4 +1,4 @@ -#! /ufs/guido/bin/sgi/python +#! /usr/local/bin/python # radio [port] # diff --git a/Demo/sgi/al/rec_play.py b/Demo/sgi/al/rec_play.py index e538b991117..693c96e453d 100755 --- a/Demo/sgi/al/rec_play.py +++ b/Demo/sgi/al/rec_play.py @@ -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() diff --git a/Demo/sgi/al/unicast.py b/Demo/sgi/al/unicast.py index 8e0c1a8378a..c9f3111feed 100755 --- a/Demo/sgi/al/unicast.py +++ b/Demo/sgi/al/unicast.py @@ -1,4 +1,4 @@ -#! /ufs/guido/bin/sgi/python +#! /usr/local/bin/python # unicast host [port] #