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
d42e46ea
Kaydet (Commit)
d42e46ea
authored
Şub 05, 1999
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ehm, when we don't need to byteswap the data, don't go through an
array object at all.
üst
ebb9c922
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
wave.py
Lib/wave.py
+4
-6
No files found.
Lib/wave.py
Dosyayı görüntüle @
d42e46ea
...
...
@@ -305,7 +305,7 @@ class Wave_read:
self
.
_data_seek_needed
=
0
if
nframes
==
0
:
return
''
if
self
.
_sampwidth
>
1
:
if
self
.
_sampwidth
>
1
and
big_endian
:
# unfortunately the fromfile() method does not take
# something that only looks like a file object, so
# we have to reach into the innards of the chunk object
...
...
@@ -316,8 +316,7 @@ class Wave_read:
nitems
=
(
self
.
_data_chunk
.
chunksize
-
self
.
_data_chunk
.
size_read
)
/
self
.
_sampwidth
data
.
fromfile
(
self
.
_data_chunk
.
file
,
nitems
)
self
.
_data_chunk
.
size_read
=
self
.
_data_chunk
.
size_read
+
nitems
*
self
.
_sampwidth
if
big_endian
:
data
.
byteswap
()
data
.
byteswap
()
data
=
data
.
tostring
()
else
:
data
=
self
.
_data_chunk
.
read
(
nframes
*
self
.
_framesize
)
...
...
@@ -487,11 +486,10 @@ class Wave_write:
nframes
=
len
(
data
)
/
(
self
.
_sampwidth
*
self
.
_nchannels
)
if
self
.
_convert
:
data
=
self
.
_convert
(
data
)
if
self
.
_sampwidth
>
1
:
if
self
.
_sampwidth
>
1
and
big_endian
:
import
array
data
=
array
.
array
(
_array_fmts
[
self
.
_sampwidth
],
data
)
if
big_endian
:
data
.
byteswap
()
data
.
byteswap
()
data
.
tofile
(
self
.
_file
)
self
.
_datawritten
=
self
.
_datawritten
+
len
(
data
)
*
self
.
_sampwidth
else
:
...
...
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