27 #include <AUD_Sound.h>
28 #include <python/PyAPI.h>
29 #include <python/PySound.h>
37 PyObject *lptr =
NULL;
39 if (PyArg_Parse(args,
"O:_sound_from_pointer", &lptr)) {
44 Sound *obj = (Sound *)Sound_empty();
46 obj->sound = AUD_Sound_copy(sound);
47 return (PyObject *)obj;
57 {
"_sound_from_pointer",
60 "_sound_from_pointer(pointer)\n\n"
61 "Returns the corresponding :class:`Factory` object.\n\n"
62 ":arg pointer: The pointer to the bSound object as long.\n"
63 ":type pointer: long\n"
64 ":return: The corresponding :class:`Factory` object.\n"
65 ":rtype: :class:`Factory`"}};
69 PyObject *
module = PyInit_aud();
71 printf(
"Unable to initialise audio\n");
77 PyDict_SetItemString(PyImport_GetModuleDict(),
"aud",
module);
static PyObject * AUD_getSoundFromPointer(PyObject *self, PyObject *args)
static PyMethodDef meth_sound_from_pointer[]
void * BKE_sound_get_factory(void *sound)
PyObject * AUD_initPython(void)
static struct PyModuleDef module