summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/cd/recvcd.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-09-17 20:36:40 (GMT)
committerGuido van Rossum <guido@python.org>2002-09-17 20:36:40 (GMT)
commit16aac45fc269ad355f069d5f76a0f4cafd06063f (patch)
tree1941156fe4df24b0c5a34d25174e3c1473c6e8d7 /Demo/sgi/cd/recvcd.py
parentd679e09970465d1b914b7d3dc11eaddbbcd6d289 (diff)
downloadcpython-16aac45fc269ad355f069d5f76a0f4cafd06063f.zip
cpython-16aac45fc269ad355f069d5f76a0f4cafd06063f.tar.gz
cpython-16aac45fc269ad355f069d5f76a0f4cafd06063f.tar.bz2
Remove the SGI demos. These were all ancient and nobody cared enough.
Diffstat (limited to 'Demo/sgi/cd/recvcd.py')
-rwxr-xr-xDemo/sgi/cd/recvcd.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/Demo/sgi/cd/recvcd.py b/Demo/sgi/cd/recvcd.py
deleted file mode 100755
index e7496d1..0000000
--- a/Demo/sgi/cd/recvcd.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Receive UDP packets from sendcd.py and play them on the speaker or
-# audio jack.
-
-import al, AL
-from socket import *
-from cd import DATASIZE
-
-PORT = 50505 # Must match the port in sendcd.py
-
-def main():
- s = socket(AF_INET, SOCK_DGRAM)
- s.bind('', PORT)
-
- oldparams = [AL.OUTPUT_RATE, 0]
- params = oldparams[:]
- al.getparams(AL.DEFAULT_DEVICE, oldparams)
- params[1] = AL.RATE_44100
- try:
- al.setparams(AL.DEFAULT_DEVICE, params)
- config = al.newconfig()
- config.setwidth(AL.SAMPLE_16)
- config.setchannels(AL.STEREO)
- port = al.openport('CD Player', 'w', config)
-
- while 1:
- data = s.recv(DATASIZE)
- if not data:
- print 'EOF'
- break
- port.writesamps(data)
- except KeyboardInterrupt:
- pass
-
- al.setparams(AL.DEFAULT_DEVICE, oldparams)
-
-main()