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
81895f8e
Kaydet (Commit)
81895f8e
authored
Kas 10, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19261: Added support for writing 24-bit samples in the sunau module.
üst
a49ccb20
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
1 deletion
+37
-1
sunau.rst
Doc/library/sunau.rst
+3
-0
sunau.py
Lib/sunau.py
+4
-1
pluck-pcm24.au
Lib/test/audiodata/pluck-pcm24.au
+0
-0
test_sunau.py
Lib/test/test_sunau.py
+28
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/sunau.rst
Dosyayı görüntüle @
81895f8e
...
...
@@ -212,6 +212,9 @@ AU_write objects, as returned by :func:`.open` above, have the following methods
Set the sample width (in bytes.)
.. versionchanged:: 3.4
Added support for 24-bit samples.
.. method:: AU_write.setframerate(n)
...
...
Lib/sunau.py
Dosyayı görüntüle @
81895f8e
...
...
@@ -352,7 +352,7 @@ class Au_write:
def
setsampwidth
(
self
,
sampwidth
):
if
self
.
_nframeswritten
:
raise
Error
(
'cannot change parameters after starting to write'
)
if
sampwidth
not
in
(
1
,
2
,
4
):
if
sampwidth
not
in
(
1
,
2
,
3
,
4
):
raise
Error
(
'bad sample width'
)
self
.
_sampwidth
=
sampwidth
...
...
@@ -465,6 +465,9 @@ class Au_write:
elif
self
.
_sampwidth
==
2
:
encoding
=
AUDIO_FILE_ENCODING_LINEAR_16
self
.
_framesize
=
2
elif
self
.
_sampwidth
==
3
:
encoding
=
AUDIO_FILE_ENCODING_LINEAR_24
self
.
_framesize
=
3
elif
self
.
_sampwidth
==
4
:
encoding
=
AUDIO_FILE_ENCODING_LINEAR_32
self
.
_framesize
=
4
...
...
Lib/test/audiodata/pluck-pcm24.au
0 → 100644
Dosyayı görüntüle @
81895f8e
This diff was suppressed by a .gitattributes entry.
Lib/test/test_sunau.py
Dosyayı görüntüle @
81895f8e
...
...
@@ -47,6 +47,34 @@ class SunauPCM16Test(audiotests.AudioWriteTests,
"""
)
class
SunauPCM24Test
(
audiotests
.
AudioWriteTests
,
audiotests
.
AudioTestsWithSourceFile
,
unittest
.
TestCase
):
module
=
sunau
sndfilename
=
'pluck-pcm24.au'
sndfilenframes
=
3307
nchannels
=
2
sampwidth
=
3
framerate
=
11025
nframes
=
48
comptype
=
'NONE'
compname
=
'not compressed'
frames
=
bytes
.
fromhex
(
"""
\
022D65FFEB9D 4B5A0F00FA54 3113C304EE2B 80DCD6084303
\
CBDEC006B261 48A99803F2F8 BFE82401B07D 036BFBFE7B5D
\
B85756FA3EC9 B4B055F3502B 299830EBCB62 1A5CA7E6D99A
\
EDFA3EE491BD C625EBE27884 0E05A9E0B6CF EF2929E02922
\
5758D8E27067 FB3557E83E16 1377BFEF8402 D82C5BF7272A
\
978F16FB7745 F5F865FC1013 086635FB9C4E DF30FCFB40EE
\
117FE0FA3438 3EE6B8FB5AC3 BC77A3FCB2F4 66D6DAFF5F32
\
CF13B9041275 431D69097A8C C1BB600EC74E 5120B912A2BA
\
EEDF641754C0 8207001664B7 7FFFFF14453F 8000001294E6
\
499C1B0EB3B2 52B73E0DBCA0 EFB2B20F5FD8 CE3CDB0FBE12
\
E4B49C0CEA2D 6344A80A5A7C 08C8FE0A1FFE 2BB9860B0A0E
\
51486F0E44E1 8BCC64113B05 B6F4EC0EEB36 4413170A5B48
\
"""
)
class
SunauPCM32Test
(
audiotests
.
AudioWriteTests
,
audiotests
.
AudioTestsWithSourceFile
,
unittest
.
TestCase
):
...
...
Misc/NEWS
Dosyayı görüntüle @
81895f8e
...
...
@@ -34,6 +34,8 @@ Core and Builtins
Library
-------
- Issue #19261: Added support for writing 24-bit samples in the sunau module.
- Issue #1097797: Added CP273 encoding, used on IBM mainframes in
Germany and Austria. Mapping provided by Michael Bierenfeld.
...
...
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