static PyObject *OSSAudioError;
+
+/* ----------------------------------------------------------------------
+ * DSP object initialization/deallocation
+ */
+
static oss_t *
newossobject(PyObject *arg)
{
PyObject_Del(xp);
}
+
+/* ----------------------------------------------------------------------
+ * Mixer object initialization/deallocation
+ */
+
static oss_mixer_t *
newossmixerobject(PyObject *arg)
{
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
}
+/* ----------------------------------------------------------------------
+ * Methods of DSP objects (OSSType)
+ */
+
static PyObject *
oss_nonblock(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)
{
}
+/* ----------------------------------------------------------------------
+ * Method tables and other bureaucracy
+ */
+
static PyMethodDef oss_methods[] = {
/* Regular file methods */
{ "read", (PyCFunction)oss_read, METH_VARARGS },