Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e62ceac7
Commit
e62ceac7
authored
Feb 05, 2002
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SndRecord and (classic only) SndRecordToFile.
parent
5bb8f78d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
Mac/Modules/snd/_Sndmodule.c
Mac/Modules/snd/_Sndmodule.c
+53
-0
No files found.
Mac/Modules/snd/_Sndmodule.c
View file @
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