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
52a40ac0
Kaydet (Commit)
52a40ac0
authored
Mar 18, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added option to set queue size
üst
dca8788d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Audio_mac.py
Mac/Lib/Audio_mac.py
+4
-3
No files found.
Mac/Lib/Audio_mac.py
Dosyayı görüntüle @
52a40ac0
QSIZE
=
100000
QSIZE
=
100000
error
=
'Audio_mac.error'
class
Play_Audio_mac
:
class
Play_Audio_mac
:
def
__init__
(
self
):
def
__init__
(
self
,
qsize
=
QSIZE
):
self
.
_chan
=
None
self
.
_chan
=
None
self
.
_qsize
=
QSIZE
self
.
_qsize
=
qsize
self
.
_outrate
=
22254
self
.
_outrate
=
22254
self
.
_sampwidth
=
1
self
.
_sampwidth
=
1
self
.
_nchannels
=
1
self
.
_nchannels
=
1
...
@@ -46,7 +47,7 @@ class Play_Audio_mac:
...
@@ -46,7 +47,7 @@ class Play_Audio_mac:
self
.
_chan
=
Snd
.
SndNewChannel
(
5
,
0
,
self
.
_callback
)
self
.
_chan
=
Snd
.
SndNewChannel
(
5
,
0
,
self
.
_callback
)
nframes
=
len
(
data
)
/
self
.
_nchannels
/
self
.
_sampwidth
nframes
=
len
(
data
)
/
self
.
_nchannels
/
self
.
_sampwidth
if
len
(
data
)
!=
nframes
*
self
.
_nchannels
*
self
.
_sampwidth
:
if
len
(
data
)
!=
nframes
*
self
.
_nchannels
*
self
.
_sampwidth
:
raise
ValueE
rror
,
'data is not a whole number of frames'
raise
e
rror
,
'data is not a whole number of frames'
while
self
.
_gc
and
\
while
self
.
_gc
and
\
self
.
getfilled
()
+
nframes
>
\
self
.
getfilled
()
+
nframes
>
\
self
.
_qsize
/
self
.
_nchannels
/
self
.
_sampwidth
:
self
.
_qsize
/
self
.
_nchannels
/
self
.
_sampwidth
:
...
...
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