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
da1cacb3
Commit
da1cacb3
authored
Dec 31, 2002
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a bunch of comments to clearly delineate sections of the code.
parent
2d6f9a9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
Modules/ossaudiodev.c
Modules/ossaudiodev.c
+28
-1
No files found.
Modules/ossaudiodev.c
View file @
da1cacb3
...
...
@@ -86,6 +86,11 @@ static PyTypeObject OSSMixerType;
static
PyObject
*
OSSAudioError
;
/* ----------------------------------------------------------------------
* DSP object initialization/deallocation
*/
static
oss_t
*
newossobject
(
PyObject
*
arg
)
{
...
...
@@ -154,6 +159,11 @@ oss_dealloc(oss_t *xp)
PyObject_Del
(
xp
);
}
/* ----------------------------------------------------------------------
* Mixer object initialization/deallocation
*/
static
oss_mixer_t
*
newossmixerobject
(
PyObject
*
arg
)
{
...
...
@@ -240,6 +250,11 @@ _do_ioctl_1(int fd, PyObject *args, char *fname, int cmd)
return
PyInt_FromLong
(
arg
);
}
/* ----------------------------------------------------------------------
* Helper functions
*/
/* _do_ioctl_1_internal() is a wrapper for ioctls that take no inputs
but return an output -- ie. we need to pass a pointer to a local C
variable so the driver can write its output there, but from Python
...
...
@@ -286,6 +301,10 @@ _do_ioctl_0(int fd, PyObject *args, char *fname, int cmd)
}
/* ----------------------------------------------------------------------
* Methods of DSP objects (OSSType)
*/
static
PyObject
*
oss_nonblock
(
oss_t
*
self
,
PyObject
*
args
)
{
...
...
@@ -646,7 +665,11 @@ oss_getptr(oss_t *self, PyObject *args)
return
Py_BuildValue
(
"iii"
,
info
.
bytes
,
info
.
blocks
,
info
.
ptr
);
}
/* Mixer methods */
/* ----------------------------------------------------------------------
* Methods of mixer objects (OSSMixerType)
*/
static
PyObject
*
oss_mixer_close
(
oss_mixer_t
*
self
,
PyObject
*
args
)
{
...
...
@@ -754,6 +777,10 @@ oss_mixer_set_recsrc(oss_mixer_t *self, PyObject *args)
}
/* ----------------------------------------------------------------------
* Method tables and other bureaucracy
*/
static
PyMethodDef
oss_methods
[]
=
{
/* Regular file methods */
{
"read"
,
(
PyCFunction
)
oss_read
,
METH_VARARGS
},
...
...
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