12#ifdef WITH_AUDASPACE_PY
16# include <python/PyAPI.h>
17# include <python/PySound.h>
21static PyObject *AUD_getSoundFromPointer(PyObject * , PyObject *args)
23 PyObject *res =
nullptr;
26 ":_sound_from_pointer",
32 Sound *obj = (Sound *)Sound_empty();
35 return (PyObject *)obj;
43static PyMethodDef meth_sound_from_pointer[] = {
44 {
"_sound_from_pointer",
45 (PyCFunction)AUD_getSoundFromPointer,
47 "_sound_from_pointer(pointer)\n\n"
48 "Returns the corresponding :class:`Factory` object.\n\n"
49 ":param pointer: The pointer to the bSound object as long.\n"
50 ":type pointer: long\n"
51 ":return: The corresponding :class:`Factory` object.\n"
52 ":rtype: :class:`Factory`"}};
56 PyObject *module = PyInit_aud();
57 if (module ==
nullptr) {
58 printf(
"Unable to initialize audio\n");
63 module,
"_sound_from_pointer", PyCFunction_New(meth_sound_from_pointer,
nullptr));
64 PyDict_SetItemString(PyImport_GetModuleDict(),
"aud", module);
std::shared_ptr< void > AUD_Sound
PyObject * BPyInit_audaspace()
AUD_Sound BKE_sound_get_factory(void *sound)