Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f1bb3349
Commit
f1bb3349
authored
Apr 06, 1995
by
Sjoerd Mullender
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use variables from module cd instead of CD.
parent
d8953cb8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
22 deletions
+21
-22
Demo/sgi/cd/cdaiff.py
Demo/sgi/cd/cdaiff.py
+2
-2
Demo/sgi/cd/cdwin.py
Demo/sgi/cd/cdwin.py
+2
-3
Demo/sgi/cd/playcd.py
Demo/sgi/cd/playcd.py
+7
-7
Demo/sgi/cd/recvcd.py
Demo/sgi/cd/recvcd.py
+2
-2
Demo/sgi/cd/sendcd.py
Demo/sgi/cd/sendcd.py
+8
-8
No files found.
Demo/sgi/cd/cdaiff.py
View file @
f1bb3349
...
...
@@ -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
()
...
...
Demo/sgi/cd/cdwin.py
View file @
f1bb3349
# 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
()
...
...
Demo/sgi/cd/playcd.py
View file @
f1bb3349
...
...
@@ -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
:
...
...
Demo/sgi/cd/recvcd.py
View file @
f1bb3349
...
...
@@ -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
...
...
Demo/sgi/cd/sendcd.py
View file @
f1bb3349
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment