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
195e33ef
Kaydet (Commit)
195e33ef
authored
Ock 09, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
- Fixed bug in getfillable()
- Added setcallback() method to set a user-callback
üst
6259af9b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Audio_mac.py
Mac/Lib/Audio_mac.py
+8
-1
No files found.
Mac/Lib/Audio_mac.py
Dosyayı görüntüle @
195e33ef
...
@@ -9,9 +9,11 @@ class Play_Audio_mac:
...
@@ -9,9 +9,11 @@ class Play_Audio_mac:
self
.
_sampwidth
=
1
self
.
_sampwidth
=
1
self
.
_nchannels
=
1
self
.
_nchannels
=
1
self
.
_gc
=
[]
self
.
_gc
=
[]
self
.
_usercallback
=
None
def
__del__
(
self
):
def
__del__
(
self
):
self
.
stop
()
self
.
stop
()
self
.
_usercallback
=
None
def
wait
(
self
):
def
wait
(
self
):
import
time
import
time
...
@@ -75,6 +77,11 @@ class Play_Audio_mac:
...
@@ -75,6 +77,11 @@ class Play_Audio_mac:
def
_callback
(
self
,
*
args
):
def
_callback
(
self
,
*
args
):
del
self
.
_gc
[
0
]
del
self
.
_gc
[
0
]
if
self
.
_usercallback
:
self
.
_usercallback
()
def
setcallback
(
self
,
callback
):
self
.
_usercallback
=
callback
def
getfilled
(
self
):
def
getfilled
(
self
):
filled
=
0
filled
=
0
...
@@ -83,7 +90,7 @@ class Play_Audio_mac:
...
@@ -83,7 +90,7 @@ class Play_Audio_mac:
return
filled
/
self
.
_nchannels
/
self
.
_sampwidth
return
filled
/
self
.
_nchannels
/
self
.
_sampwidth
def
getfillable
(
self
):
def
getfillable
(
self
):
return
self
.
_qsize
-
self
.
getfilled
()
return
(
self
.
_qsize
/
self
.
_nchannels
/
self
.
_sampwidth
)
-
self
.
getfilled
()
def
ulaw2lin
(
self
,
data
):
def
ulaw2lin
(
self
,
data
):
import
audioop
import
audioop
...
...
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