12#include <python/PyAPI.h>
13#include <python/PySound.h>
21 PyObject *lptr =
NULL;
23 if (PyArg_Parse(args,
"O:_sound_from_pointer", &lptr)) {
28 Sound *obj = (Sound *)Sound_empty();
30 obj->sound = AUD_Sound_copy(sound);
31 return (PyObject *)obj;
41 {
"_sound_from_pointer",
44 "_sound_from_pointer(pointer)\n\n"
45 "Returns the corresponding :class:`Factory` object.\n\n"
46 ":arg pointer: The pointer to the bSound object as long.\n"
47 ":type pointer: long\n"
48 ":return: The corresponding :class:`Factory` object.\n"
49 ":rtype: :class:`Factory`"}};
53 PyObject *
module = PyInit_aud();
55 printf(
"Unable to initialise audio\n");
61 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