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
e62ceac7
Kaydet (Commit)
e62ceac7
authored
Şub 05, 2002
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added SndRecord and (classic only) SndRecordToFile.
üst
5bb8f78d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
_Sndmodule.c
Mac/Modules/snd/_Sndmodule.c
+53
-0
No files found.
Mac/Modules/snd/_Sndmodule.c
Dosyayı görüntüle @
e62ceac7
...
...
@@ -961,6 +961,52 @@ static PyObject *Snd_SPBVersion(PyObject *_self, PyObject *_args)
return
_res
;
}
static
PyObject
*
Snd_SndRecord
(
PyObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
OSErr
_err
;
Point
corner
;
OSType
quality
;
SndListHandle
sndHandle
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&O&"
,
PyMac_GetPoint
,
&
corner
,
PyMac_GetOSType
,
&
quality
))
return
NULL
;
_err
=
SndRecord
((
ModalFilterUPP
)
0
,
corner
,
quality
,
&
sndHandle
);
if
(
_err
!=
noErr
)
return
PyMac_Error
(
_err
);
_res
=
Py_BuildValue
(
"O&"
,
ResObj_New
,
sndHandle
);
return
_res
;
}
#if !TARGET_API_MAC_CARBON
static
PyObject
*
Snd_SndRecordToFile
(
PyObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
OSErr
_err
;
Point
corner
;
OSType
quality
;
short
fRefNum
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&O&h"
,
PyMac_GetPoint
,
&
corner
,
PyMac_GetOSType
,
&
quality
,
&
fRefNum
))
return
NULL
;
_err
=
SndRecordToFile
((
ModalFilterUPP
)
0
,
corner
,
quality
,
fRefNum
);
if
(
_err
!=
noErr
)
return
PyMac_Error
(
_err
);
Py_INCREF
(
Py_None
);
_res
=
Py_None
;
return
_res
;
}
#endif
static
PyObject
*
Snd_SPBSignInDevice
(
PyObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
...
...
@@ -1309,6 +1355,13 @@ static PyMethodDef Snd_methods[] = {
"(OSType compressionType) -> (Str255 compressionName)"
},
{
"SPBVersion"
,
(
PyCFunction
)
Snd_SPBVersion
,
1
,
"() -> (NumVersion _rv)"
},
{
"SndRecord"
,
(
PyCFunction
)
Snd_SndRecord
,
1
,
"(Point corner, OSType quality) -> (SndListHandle sndHandle)"
},
#if !TARGET_API_MAC_CARBON
{
"SndRecordToFile"
,
(
PyCFunction
)
Snd_SndRecordToFile
,
1
,
"(Point corner, OSType quality, short fRefNum) -> None"
},
#endif
{
"SPBSignInDevice"
,
(
PyCFunction
)
Snd_SPBSignInDevice
,
1
,
"(short deviceRefNum, Str255 deviceName) -> None"
},
{
"SPBSignOutDevice"
,
(
PyCFunction
)
Snd_SPBSignOutDevice
,
1
,
...
...
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