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
7564a641
Kaydet (Commit)
7564a641
authored
Ock 22, 1993
tarafından
Sjoerd Mullender
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Found and fixed a few bugs in the handling of audio files with MARKs.
üst
eeabe7eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
aifc.py
Lib/aifc.py
+8
-12
No files found.
Lib/aifc.py
Dosyayı görüntüle @
7564a641
...
...
@@ -377,12 +377,9 @@ class Aifc_read():
else
:
raise
Error
,
'not an AIFF or AIFF-C file'
self
.
_comm_chunk_read
=
0
while
1
:
while
formlength
>
0
:
self
.
_ssnd_seek_needed
=
1
try
:
chunk
=
Chunk
()
.
init
(
self
.
_file
)
except
EOFError
:
raise
Error
,
'COMM chunk and/or SSND chunk missing'
chunk
=
Chunk
()
.
init
(
self
.
_file
)
formlength
=
formlength
-
8
-
chunk
.
chunksize
if
chunk
.
chunksize
&
1
:
formlength
=
formlength
-
1
...
...
@@ -393,10 +390,6 @@ class Aifc_read():
self
.
_ssnd_chunk
=
chunk
dummy
=
chunk
.
read
(
8
)
self
.
_ssnd_seek_needed
=
0
if
formlength
<=
0
:
if
not
self
.
_comm_chunk_read
:
raise
Error
,
'COMM chunk missing'
break
elif
chunk
.
chunkname
==
'FVER'
:
self
.
_version
=
_read_long
(
chunk
)
elif
chunk
.
chunkname
==
'MARK'
:
...
...
@@ -406,6 +399,8 @@ class Aifc_read():
else
:
raise
Error
,
'unrecognized chunk type '
+
chunk
.
chunkname
chunk
.
skip
()
if
not
self
.
_comm_chunk_read
or
not
self
.
_ssnd_chunk
:
raise
Error
,
'COMM chunk and/or SSND chunk missing'
if
self
.
_aifc
and
self
.
_decomp
:
params
=
[
CL
.
ORIGINAL_FORMAT
,
0
,
\
CL
.
BITS_PER_COMPONENT
,
0
,
\
...
...
@@ -707,7 +702,7 @@ class Aifc_write():
return
self
.
_nchannels
,
self
.
_sampwidth
,
self
.
_framerate
,
\
self
.
_nframes
,
self
.
_comptype
,
self
.
_compname
def
setmark
(
self
,
(
id
,
pos
,
name
)
):
def
setmark
(
self
,
id
,
pos
,
name
):
if
id
<=
0
:
raise
Error
,
'marker ID must be > 0'
if
pos
<
0
:
...
...
@@ -863,7 +858,8 @@ class Aifc_write():
else
:
datalength
=
self
.
_datawritten
if
datalength
==
self
.
_datalength
and
\
self
.
_nframes
==
self
.
_nframeswritten
:
self
.
_nframes
==
self
.
_nframeswritten
and
\
self
.
_marklength
==
0
:
self
.
_file
.
seek
(
curpos
,
0
)
return
self
.
_file
.
seek
(
self
.
_form_length_pos
,
0
)
...
...
@@ -888,7 +884,7 @@ class Aifc_write():
length
=
length
+
1
_write_long
(
self
.
_file
,
length
)
self
.
_marklength
=
length
+
8
_write_short
(
len
(
self
.
_file
,
markers
))
_write_short
(
self
.
_file
,
len
(
self
.
_
markers
))
for
marker
in
self
.
_markers
:
id
,
pos
,
name
=
marker
_write_short
(
self
.
_file
,
id
)
...
...
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