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
e4b86398
Kaydet (Commit)
e4b86398
authored
Kas 17, 2012
tarafından
Jesus Cea
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #16461: Wave library should be able to deal with 4GB wav files, and sample rate of 44100 Hz.
üst
103f17ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
wave.py
Lib/wave.py
+6
-6
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/wave.py
Dosyayı görüntüle @
e4b86398
...
...
@@ -261,9 +261,9 @@ class Wave_read:
#
def
_read_fmt_chunk
(
self
,
chunk
):
wFormatTag
,
self
.
_nchannels
,
self
.
_framerate
,
dwAvgBytesPerSec
,
wBlockAlign
=
struct
.
unpack_from
(
'<
hhllh
'
,
chunk
.
read
(
14
))
wFormatTag
,
self
.
_nchannels
,
self
.
_framerate
,
dwAvgBytesPerSec
,
wBlockAlign
=
struct
.
unpack_from
(
'<
HHLLH
'
,
chunk
.
read
(
14
))
if
wFormatTag
==
WAVE_FORMAT_PCM
:
sampwidth
=
struct
.
unpack_from
(
'<
h
'
,
chunk
.
read
(
2
))[
0
]
sampwidth
=
struct
.
unpack_from
(
'<
H
'
,
chunk
.
read
(
2
))[
0
]
self
.
_sampwidth
=
(
sampwidth
+
7
)
//
8
else
:
raise
Error
(
'unknown format:
%
r'
%
(
wFormatTag
,))
...
...
@@ -466,14 +466,14 @@ class Wave_write:
self
.
_nframes
=
initlength
//
(
self
.
_nchannels
*
self
.
_sampwidth
)
self
.
_datalength
=
self
.
_nframes
*
self
.
_nchannels
*
self
.
_sampwidth
self
.
_form_length_pos
=
self
.
_file
.
tell
()
self
.
_file
.
write
(
struct
.
pack
(
'<
l4s4slhhllhh
4s'
,
self
.
_file
.
write
(
struct
.
pack
(
'<
L4s4sLHHLLHH
4s'
,
36
+
self
.
_datalength
,
b
'WAVE'
,
b
'fmt '
,
16
,
WAVE_FORMAT_PCM
,
self
.
_nchannels
,
self
.
_framerate
,
self
.
_nchannels
*
self
.
_framerate
*
self
.
_sampwidth
,
self
.
_nchannels
*
self
.
_sampwidth
,
self
.
_sampwidth
*
8
,
b
'data'
))
self
.
_data_length_pos
=
self
.
_file
.
tell
()
self
.
_file
.
write
(
struct
.
pack
(
'<
l
'
,
self
.
_datalength
))
self
.
_file
.
write
(
struct
.
pack
(
'<
L
'
,
self
.
_datalength
))
self
.
_headerwritten
=
True
def
_patchheader
(
self
):
...
...
@@ -482,9 +482,9 @@ class Wave_write:
return
curpos
=
self
.
_file
.
tell
()
self
.
_file
.
seek
(
self
.
_form_length_pos
,
0
)
self
.
_file
.
write
(
struct
.
pack
(
'<
l
'
,
36
+
self
.
_datawritten
))
self
.
_file
.
write
(
struct
.
pack
(
'<
L
'
,
36
+
self
.
_datawritten
))
self
.
_file
.
seek
(
self
.
_data_length_pos
,
0
)
self
.
_file
.
write
(
struct
.
pack
(
'<
l
'
,
self
.
_datawritten
))
self
.
_file
.
write
(
struct
.
pack
(
'<
L
'
,
self
.
_datawritten
))
self
.
_file
.
seek
(
curpos
,
0
)
self
.
_datalength
=
self
.
_datawritten
...
...
Misc/NEWS
Dosyayı görüntüle @
e4b86398
...
...
@@ -222,6 +222,9 @@ Library
- Issue #16270: urllib may hang when used for retrieving files via FTP by using
a context manager. Patch by Giampaolo Rodola'.
- Issue #16461: Wave library should be able to deal with 4GB wav files,
and sample rate of 44100 Hz.
- Issue #16176: Properly identify Windows 8 via platform.platform()
- Issue #16114: The subprocess module no longer provides a misleading
...
...
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