Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
58230c3a
Kaydet (Commit)
58230c3a
authored
Nis 22, 1992
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Changed caching code
üst
9ac9063c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
26 deletions
+46
-26
readcd.py
Lib/irix5/readcd.py
+23
-13
readcd.py
Lib/plat-irix5/readcd.py
+23
-13
No files found.
Lib/irix5/readcd.py
Dosyayı görüntüle @
58230c3a
...
...
@@ -53,11 +53,11 @@ class Readcd():
def
pmsf2msf
(
self
,
track
,
min
,
sec
,
frame
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
getstatus
()
if
not
self
.
trackinfo
:
dummy
=
self
.
gettrackinfo
()
self
.
cachestatus
()
if
track
<
self
.
status
[
5
]
or
track
>
self
.
status
[
6
]:
raise
Error
,
'track number out of range'
if
not
self
.
trackinfo
:
self
.
cacheinfo
()
start
,
total
=
self
.
trackinfo
[
track
]
start
=
((
start
[
0
]
*
60
)
+
start
[
1
])
*
75
+
start
[
2
]
total
=
((
total
[
0
]
*
60
)
+
total
[
1
])
*
75
+
total
[
2
]
...
...
@@ -77,7 +77,7 @@ class Readcd():
def
appendstretch
(
self
,
start
,
end
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
get
status
()
self
.
cache
status
()
if
not
start
:
start
=
1
if
not
end
:
...
...
@@ -149,13 +149,9 @@ class Readcd():
def
gettrackinfo
(
self
,
*
arg
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
get
status
()
self
.
cache
status
()
if
not
self
.
trackinfo
:
self
.
trackinfo
=
[]
for
i
in
range
(
self
.
status
[
5
]):
self
.
trackinfo
.
append
(
None
)
for
i
in
range
(
self
.
status
[
5
],
self
.
status
[
6
]
+
1
):
self
.
trackinfo
.
append
(
self
.
player
.
gettrackinfo
(
i
))
self
.
cacheinfo
()
if
len
(
arg
)
==
0
:
return
self
.
trackinfo
[
self
.
status
[
5
]:
self
.
status
[
6
]
+
1
]
result
=
[]
...
...
@@ -165,13 +161,27 @@ class Readcd():
result
.
append
(
self
.
trackinfo
[
i
])
return
result
def
getstatus
(
self
):
def
cacheinfo
(
self
):
if
not
self
.
status
:
self
.
cachestatus
()
self
.
trackinfo
=
[]
for
i
in
range
(
self
.
status
[
5
]):
self
.
trackinfo
.
append
(
None
)
for
i
in
range
(
self
.
status
[
5
],
self
.
status
[
6
]
+
1
):
self
.
trackinfo
.
append
(
self
.
player
.
gettrackinfo
(
i
))
def
cachestatus
(
self
):
self
.
status
=
self
.
player
.
getstatus
()
return
self
.
status
if
self
.
status
[
0
]
==
CD
.
NODISK
:
self
.
status
=
None
raise
Error
,
'no disk in player'
def
getstatus
(
self
):
return
self
.
player
.
getstatus
()
def
play
(
self
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
get
status
()
self
.
cache
status
()
size
=
self
.
player
.
bestreadsize
()
self
.
listindex
=
0
self
.
playing
=
0
...
...
Lib/plat-irix5/readcd.py
Dosyayı görüntüle @
58230c3a
...
...
@@ -53,11 +53,11 @@ class Readcd():
def
pmsf2msf
(
self
,
track
,
min
,
sec
,
frame
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
getstatus
()
if
not
self
.
trackinfo
:
dummy
=
self
.
gettrackinfo
()
self
.
cachestatus
()
if
track
<
self
.
status
[
5
]
or
track
>
self
.
status
[
6
]:
raise
Error
,
'track number out of range'
if
not
self
.
trackinfo
:
self
.
cacheinfo
()
start
,
total
=
self
.
trackinfo
[
track
]
start
=
((
start
[
0
]
*
60
)
+
start
[
1
])
*
75
+
start
[
2
]
total
=
((
total
[
0
]
*
60
)
+
total
[
1
])
*
75
+
total
[
2
]
...
...
@@ -77,7 +77,7 @@ class Readcd():
def
appendstretch
(
self
,
start
,
end
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
get
status
()
self
.
cache
status
()
if
not
start
:
start
=
1
if
not
end
:
...
...
@@ -149,13 +149,9 @@ class Readcd():
def
gettrackinfo
(
self
,
*
arg
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
get
status
()
self
.
cache
status
()
if
not
self
.
trackinfo
:
self
.
trackinfo
=
[]
for
i
in
range
(
self
.
status
[
5
]):
self
.
trackinfo
.
append
(
None
)
for
i
in
range
(
self
.
status
[
5
],
self
.
status
[
6
]
+
1
):
self
.
trackinfo
.
append
(
self
.
player
.
gettrackinfo
(
i
))
self
.
cacheinfo
()
if
len
(
arg
)
==
0
:
return
self
.
trackinfo
[
self
.
status
[
5
]:
self
.
status
[
6
]
+
1
]
result
=
[]
...
...
@@ -165,13 +161,27 @@ class Readcd():
result
.
append
(
self
.
trackinfo
[
i
])
return
result
def
getstatus
(
self
):
def
cacheinfo
(
self
):
if
not
self
.
status
:
self
.
cachestatus
()
self
.
trackinfo
=
[]
for
i
in
range
(
self
.
status
[
5
]):
self
.
trackinfo
.
append
(
None
)
for
i
in
range
(
self
.
status
[
5
],
self
.
status
[
6
]
+
1
):
self
.
trackinfo
.
append
(
self
.
player
.
gettrackinfo
(
i
))
def
cachestatus
(
self
):
self
.
status
=
self
.
player
.
getstatus
()
return
self
.
status
if
self
.
status
[
0
]
==
CD
.
NODISK
:
self
.
status
=
None
raise
Error
,
'no disk in player'
def
getstatus
(
self
):
return
self
.
player
.
getstatus
()
def
play
(
self
):
if
not
self
.
status
:
self
.
status
=
self
.
player
.
get
status
()
self
.
cache
status
()
size
=
self
.
player
.
bestreadsize
()
self
.
listindex
=
0
self
.
playing
=
0
...
...
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