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
986b5ee4
Kaydet (Commit)
986b5ee4
authored
Eki 12, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
üst
8b1701d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
aifc.py
Lib/aifc.py
+7
-5
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/aifc.py
Dosyayı görüntüle @
986b5ee4
...
...
@@ -480,7 +480,7 @@ class Aifc_read:
pass
else
:
self
.
_convert
=
self
.
_adpcm2lin
self
.
_
framesize
=
self
.
_framesize
//
4
self
.
_
sampwidth
=
2
return
# for ULAW and ALAW try Compression Library
try
:
...
...
@@ -490,21 +490,20 @@ class Aifc_read:
try
:
import
audioop
self
.
_convert
=
self
.
_ulaw2lin
self
.
_
framesize
=
self
.
_framesize
//
2
self
.
_
sampwidth
=
2
return
except
ImportError
:
pass
raise
Error
,
'cannot read compressed AIFF-C files'
if
self
.
_comptype
==
'ULAW'
:
scheme
=
cl
.
G711_ULAW
self
.
_framesize
=
self
.
_framesize
//
2
elif
self
.
_comptype
==
'ALAW'
:
scheme
=
cl
.
G711_ALAW
self
.
_framesize
=
self
.
_framesize
//
2
else
:
raise
Error
,
'unsupported compression type'
self
.
_decomp
=
cl
.
OpenDecompressor
(
scheme
)
self
.
_convert
=
self
.
_decomp_data
self
.
_sampwidth
=
2
else
:
self
.
_comptype
=
'NONE'
self
.
_compname
=
'not compressed'
...
...
@@ -867,7 +866,10 @@ class Aifc_write:
_write_short
(
self
.
_file
,
self
.
_nchannels
)
self
.
_nframes_pos
=
self
.
_file
.
tell
()
_write_ulong
(
self
.
_file
,
self
.
_nframes
)
_write_short
(
self
.
_file
,
self
.
_sampwidth
*
8
)
if
self
.
_comptype
in
(
'ULAW'
,
'ALAW'
,
'G722'
):
_write_short
(
self
.
_file
,
8
)
else
:
_write_short
(
self
.
_file
,
self
.
_sampwidth
*
8
)
_write_float
(
self
.
_file
,
self
.
_framerate
)
if
self
.
_aifc
:
self
.
_file
.
write
(
self
.
_comptype
)
...
...
Misc/NEWS
Dosyayı görüntüle @
986b5ee4
...
...
@@ -32,6 +32,9 @@ Core and Builtins
Library
-------
- Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
- Issue #19158: a rare race in BoundedSemaphore could allow .release() too
often.
...
...
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