12#include <python/PyAPI.h>
13#include <python/PySound.h>
19 PyObject *lptr = NULL;
21 if (PyArg_Parse(args,
"O:_sound_from_pointer", &lptr)) {
26 Sound *obj = (Sound *)Sound_empty();
28 obj->sound = AUD_Sound_copy(sound);
29 return (PyObject *)obj;
39 {
"_sound_from_pointer",
42 "_sound_from_pointer(pointer)\n\n"
43 "Returns the corresponding :class:`Factory` object.\n\n"
44 ":arg pointer: The pointer to the bSound object as long.\n"
45 ":type pointer: long\n"
46 ":return: The corresponding :class:`Factory` object.\n"
47 ":rtype: :class:`Factory`"}};
51 PyObject *
module = PyInit_aud();
53 printf(
"Unable to initialise audio\n");
59 PyDict_SetItemString(PyImport_GetModuleDict(),
"aud",
module);
void * BKE_sound_get_factory(void *sound)
static PyMethodDef meth_sound_from_pointer[]
PyObject * AUD_initPython(void)
static PyObject * AUD_getSoundFromPointer(PyObject *self, PyObject *args)
static struct PyModuleDef module