From a90d30c8638a87234048060d8fcb385369b3daaf Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Thu, 16 Jun 2011 09:13:29 +0000 Subject: 3D Audio GSoC: GameEngine Python access sound actuator's sound (with setting! :-D). --- intern/audaspace/Python/AUD_PyAPI.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'intern/audaspace/Python/AUD_PyAPI.cpp') diff --git a/intern/audaspace/Python/AUD_PyAPI.cpp b/intern/audaspace/Python/AUD_PyAPI.cpp index ac25ab34a69..b6e336eb329 100644 --- a/intern/audaspace/Python/AUD_PyAPI.cpp +++ b/intern/audaspace/Python/AUD_PyAPI.cpp @@ -2881,6 +2881,19 @@ Factory_empty() return FactoryType.tp_alloc(&FactoryType, 0); } +Factory* +checkFactory(PyObject* factory) +{ + if(!PyObject_TypeCheck(factory, &FactoryType)) + { + PyErr_SetString(PyExc_TypeError, "Object is not of type Factory!"); + return NULL; + } + + return (Factory*)factory; +} + + // ==================================================================== PyDoc_STRVAR(M_aud_doc, -- cgit v1.2.3