]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
micro changes
authorGuido van Rossum <guido@python.org>
Fri, 7 Oct 1994 10:23:49 +0000 (10:23 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 7 Oct 1994 10:23:49 +0000 (10:23 +0000)
Demo/sgi/al/alwatch.py
Demo/sgi/al/broadcast.py
Demo/sgi/al/cmpaf.py
Demo/sgi/al/playaiff.py
Demo/sgi/al/playold.py
Demo/sgi/al/radio.py
Demo/sgi/al/rec_play.py
Demo/sgi/al/unicast.py

index 4a52ab22fa7d4cb016536ae9a0a288b3618d64d1..da747d4d81c3b0063d973d0d877f63b369d04e20 100755 (executable)
@@ -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:
index 5ee96560f837bc24c110ad1ea3aed7d6ce4a5096..ce4875e1fc44d91f7e476a112820eca6ff7e6e07 100755 (executable)
@@ -1,4 +1,4 @@
-#! /ufs/guido/bin/sgi/python
+#! /usr/local/bin/python
 
 # broadcast [port]
 #
index 509f0aad18a9babf843cbec30481f88ebe4012b6..6b91e30fd6c252739ffbe7491a42268987adf1b9 100755 (executable)
@@ -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()
index 756748deb7b4c07643173d4b814efc20329a9961..22120dc66ca47b91a56f51800f04a816f33c15cf 100755 (executable)
@@ -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()
index d0cb59268af5882247f45be7f3796bc14085d1f7..9792c168c5d105cccf02b6f845f731ab71aa1427 100755 (executable)
@@ -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()
index 6cde805c38f0f2bb4b556be3940c19099618f3c6..a6f6809187c4be62e49aad92dc379860b67bf2e4 100755 (executable)
@@ -1,4 +1,4 @@
-#! /ufs/guido/bin/sgi/python
+#! /usr/local/bin/python
 
 # radio [port]
 #
index e538b991117233afdf781d74f47c9058edfccbda..693c96e453dbccd7164232b6be41eee786d6551c 100755 (executable)
@@ -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()
 
index 8e0c1a8378a68ea9169db774d55780c5d4bd4e8f..c9f3111feed445212d7eb6c52011cab553872872 100755 (executable)
@@ -1,4 +1,4 @@
-#! /ufs/guido/bin/sgi/python
+#! /usr/local/bin/python
 
 # unicast host [port]
 #