10 #include <AUD_Sound.h>
11 #include <python/PyAPI.h>
12 #include <python/PySound.h>
20 PyObject *lptr =
NULL;
22 if (PyArg_Parse(args,
"O:_sound_from_pointer", &lptr)) {
27 Sound *obj = (Sound *)Sound_empty();
29 obj->sound = AUD_Sound_copy(sound);
30 return (PyObject *)obj;
40 {
"_sound_from_pointer",
43 "_sound_from_pointer(pointer)\n\n"
44 "Returns the corresponding :class:`Factory` object.\n\n"
45 ":arg pointer: The pointer to the bSound object as long.\n"
46 ":type pointer: long\n"
47 ":return: The corresponding :class:`Factory` object.\n"
48 ":rtype: :class:`Factory`"}};
52 PyObject *
module = PyInit_aud();
54 printf(
"Unable to initialise audio\n");
60 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