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
5b37f97e
Kaydet (Commit)
5b37f97e
authored
Eki 17, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #19276: Fixed the wave module on 64-bit big-endian platforms.
üst
2bb0ac0a
d3b75051
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
wave.py
Lib/wave.py
+3
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/wave.py
Dosyayı görüntüle @
5b37f97e
...
@@ -80,7 +80,7 @@ class Error(Exception):
...
@@ -80,7 +80,7 @@ class Error(Exception):
WAVE_FORMAT_PCM
=
0x0001
WAVE_FORMAT_PCM
=
0x0001
_array_fmts
=
None
,
'b'
,
'h'
,
None
,
'
l
'
_array_fmts
=
None
,
'b'
,
'h'
,
None
,
'
i
'
import
struct
import
struct
import
sys
import
sys
...
@@ -244,6 +244,7 @@ class Wave_read:
...
@@ -244,6 +244,7 @@ class Wave_read:
import
array
import
array
chunk
=
self
.
_data_chunk
chunk
=
self
.
_data_chunk
data
=
array
.
array
(
_array_fmts
[
self
.
_sampwidth
])
data
=
array
.
array
(
_array_fmts
[
self
.
_sampwidth
])
assert
data
.
itemsize
==
self
.
_sampwidth
nitems
=
nframes
*
self
.
_nchannels
nitems
=
nframes
*
self
.
_nchannels
if
nitems
*
self
.
_sampwidth
>
chunk
.
chunksize
-
chunk
.
size_read
:
if
nitems
*
self
.
_sampwidth
>
chunk
.
chunksize
-
chunk
.
size_read
:
nitems
=
(
chunk
.
chunksize
-
chunk
.
size_read
)
//
self
.
_sampwidth
nitems
=
(
chunk
.
chunksize
-
chunk
.
size_read
)
//
self
.
_sampwidth
...
@@ -433,6 +434,7 @@ class Wave_write:
...
@@ -433,6 +434,7 @@ class Wave_write:
if
self
.
_sampwidth
>
1
and
sys
.
byteorder
==
'big'
:
if
self
.
_sampwidth
>
1
and
sys
.
byteorder
==
'big'
:
import
array
import
array
data
=
array
.
array
(
_array_fmts
[
self
.
_sampwidth
],
data
)
data
=
array
.
array
(
_array_fmts
[
self
.
_sampwidth
],
data
)
assert
data
.
itemsize
==
self
.
_sampwidth
data
.
byteswap
()
data
.
byteswap
()
data
.
tofile
(
self
.
_file
)
data
.
tofile
(
self
.
_file
)
self
.
_datawritten
=
self
.
_datawritten
+
len
(
data
)
*
self
.
_sampwidth
self
.
_datawritten
=
self
.
_datawritten
+
len
(
data
)
*
self
.
_sampwidth
...
...
Misc/NEWS
Dosyayı görüntüle @
5b37f97e
...
@@ -42,6 +42,8 @@ Core and Builtins
...
@@ -42,6 +42,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #19276: Fixed the wave module on 64-bit big-endian platforms.
- Issue #19266: Rename the new-in-3.4 ``contextlib.ignore`` context manager
- Issue #19266: Rename the new-in-3.4 ``contextlib.ignore`` context manager
to ``contextlib.suppress`` in order to be more consistent with existing
to ``contextlib.suppress`` in order to be more consistent with existing
descriptions of that operation elsewhere in the language and standard
descriptions of that operation elsewhere in the language and standard
...
...
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