summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorSjoerd Mullender <sjoerd@acm.org>1995-04-06 14:46:31 (GMT)
committerSjoerd Mullender <sjoerd@acm.org>1995-04-06 14:46:31 (GMT)
commitf1bb33495024232d3b7d0d852436c66a875e21b2 (patch)
tree429c70fa3c7529a20d60505ad6a6b715512a4957 /Demo
parentd8953cb8d93e8e2f52521a91fa1b090fb52c4e5c (diff)
downloadcpython-f1bb33495024232d3b7d0d852436c66a875e21b2.zip
cpython-f1bb33495024232d3b7d0d852436c66a875e21b2.tar.gz
cpython-f1bb33495024232d3b7d0d852436c66a875e21b2.tar.bz2
Use variables from module cd instead of CD.
Diffstat (limited to 'Demo')
-rwxr-xr-xDemo/sgi/cd/cdaiff.py4
-rwxr-xr-xDemo/sgi/cd/cdwin.py5
-rwxr-xr-xDemo/sgi/cd/playcd.py14
-rwxr-xr-xDemo/sgi/cd/recvcd.py4
-rwxr-xr-xDemo/sgi/cd/sendcd.py16
5 files changed, 21 insertions, 22 deletions
diff --git a/Demo/sgi/cd/cdaiff.py b/Demo/sgi/cd/cdaiff.py
index e66f6a4..a1b490f 100755
--- a/Demo/sgi/cd/cdaiff.py
+++ b/Demo/sgi/cd/cdaiff.py
@@ -2,7 +2,7 @@ import sys
import readcd
import aifc
import AL
-import CD
+import cd
Error = 'cdaiff.Error'
@@ -26,7 +26,7 @@ def main():
r.appendstretch(x[0], x[1])
except TypeError:
r.appendtrack(x)
- r.setcallback(CD.AUDIO, writeaudio, a)
+ r.setcallback(cd.audio, writeaudio, a)
r.play()
a.close()
diff --git a/Demo/sgi/cd/cdwin.py b/Demo/sgi/cd/cdwin.py
index 1a562c2..284ad82 100755
--- a/Demo/sgi/cd/cdwin.py
+++ b/Demo/sgi/cd/cdwin.py
@@ -1,7 +1,6 @@
# Window interface to (some of) the CD player's vital audio functions
import cd
-import CD
import stdwin
from stdwinevents import *
import mainloop
@@ -44,9 +43,9 @@ def but1(win):
def but2(win):
state = win.player.getstatus()[0]
- if state == CD.READY:
+ if state == cd.ready:
win.player.play(1, 1)
- elif state in (CD.PLAYING, CD.PAUSED):
+ elif state in (cd.playing, cd.paused):
win.player.togglepause()
else:
stdwin.fleep()
diff --git a/Demo/sgi/cd/playcd.py b/Demo/sgi/cd/playcd.py
index b245ff0..44fa5a0 100755
--- a/Demo/sgi/cd/playcd.py
+++ b/Demo/sgi/cd/playcd.py
@@ -50,7 +50,7 @@ def prstatus(status):
print 'Future:', dummy
def main():
- import sys, readcd, al, AL, CD, cdplayer
+ import sys, readcd, al, AL, cd, cdplayer
verbose = 0
r = readcd.Readcd()
prstatus(r.getstatus())
@@ -84,13 +84,13 @@ def main():
for i in range(8):
r.setcallback(i, callback, None)
if verbose:
- r.setcallback(CD.PTIME, tcallback, None)
- r.setcallback(CD.ATIME, tcallback, None)
+ r.setcallback(cd.ptime, tcallback, None)
+ r.setcallback(cd.atime, tcallback, None)
else:
- r.removecallback(CD.PTIME)
- r.removecallback(CD.ATIME)
- r.setcallback(CD.PNUM, prtrack, cdinfo)
- r.setcallback(CD.AUDIO, playaudio, port)
+ r.removecallback(cd.ptime)
+ r.removecallback(cd.atime)
+ r.setcallback(cd.pnum, prtrack, cdinfo)
+ r.setcallback(cd.audio, playaudio, port)
data = r.play()
except KeyboardInterrupt:
diff --git a/Demo/sgi/cd/recvcd.py b/Demo/sgi/cd/recvcd.py
index db5cc41..e7496d1 100755
--- a/Demo/sgi/cd/recvcd.py
+++ b/Demo/sgi/cd/recvcd.py
@@ -3,7 +3,7 @@
import al, AL
from socket import *
-from CD import CDDA_DATASIZE
+from cd import DATASIZE
PORT = 50505 # Must match the port in sendcd.py
@@ -23,7 +23,7 @@ def main():
port = al.openport('CD Player', 'w', config)
while 1:
- data = s.recv(CDDA_DATASIZE)
+ data = s.recv(DATASIZE)
if not data:
print 'EOF'
break
diff --git a/Demo/sgi/cd/sendcd.py b/Demo/sgi/cd/sendcd.py
index 850f6a5..a6cf8e7 100755
--- a/Demo/sgi/cd/sendcd.py
+++ b/Demo/sgi/cd/sendcd.py
@@ -51,14 +51,14 @@ def main():
print 'socket connected'
parser = cd.createparser()
- parser.setcallback(0, audiocallback, port)
- parser.setcallback(1, pnumcallback, player)
- parser.setcallback(2, indexcallback, None)
- ## 3 = ptime: too many calls
- ## 4 = atime: too many calls
- parser.setcallback(5, catalogcallback, None)
- parser.setcallback(6, identcallback, None)
- parser.setcallback(7, controlcallback, None)
+ parser.setcallback(cd.audio, audiocallback, port)
+ parser.setcallback(cd.pnum, pnumcallback, player)
+ parser.setcallback(cd.index, indexcallback, None)
+ ## cd.ptime: too many calls
+ ## cd.atime: too many calls
+ parser.setcallback(cd.catalog, catalogcallback, None)
+ parser.setcallback(cd.ident, identcallback, None)
+ parser.setcallback(cd.control, controlcallback, None)
if len(args) >= 2:
if len(args) >= 3: