diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-08-07 15:54:58 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-08-07 15:54:58 +0400 |
commit | 2d884fc035d403d43c7a18e3e61cd56ccdfbec2b (patch) | |
tree | 2548dcfbb52370618d1f255f57e65bcf1cbb49a4 /intern/audaspace/Python/AUD_PyAPI.cpp | |
parent | 4370099fb0bc1bdd21f78b14a91a1d8eb76e1bc1 (diff) |
3D Audio GSoC:
* Pepper depends on ffmpeg 0.7.1 or higher now, windows and mac build systems set to ffmpeg-0.8
* Fixed orientation retrieval in OpenAL device code.
* Added stopAll() method to AUD_IDevice (also for Python) and call it on BGE exit
* Changed BGE to use audaspace via native C++ instead over the C API.
* Made AUD_SequencerFactory and AUD_SequencerEntry thread safe.
* Changed sound caching into a flag which fixes problems on file loading, especially with undo.
* Removed unused parameter from sound_mute_scene_sound
* Fixed bug: changing FPS didn't update the sequencer sound positions.
* Fixed bug: Properties of sequencer strips weren't set correctly.
* Minor warning fixes.
Diffstat (limited to 'intern/audaspace/Python/AUD_PyAPI.cpp')
-rw-r--r-- | intern/audaspace/Python/AUD_PyAPI.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/intern/audaspace/Python/AUD_PyAPI.cpp b/intern/audaspace/Python/AUD_PyAPI.cpp index 94e02576ccc..928c67c5196 100644 --- a/intern/audaspace/Python/AUD_PyAPI.cpp +++ b/intern/audaspace/Python/AUD_PyAPI.cpp @@ -2245,6 +2245,25 @@ Device_play(Device *self, PyObject *args, PyObject *kwds) return (PyObject *)handle; } +PyDoc_STRVAR(M_aud_Device_stopAll_doc, + "stopAll()\n\n" + "Stops all playing and paused sounds."); + +static PyObject * +Device_stopAll(Device *self) +{ + try + { + (*reinterpret_cast<AUD_Reference<AUD_IDevice>*>(self->device))->stopAll(); + Py_RETURN_NONE; + } + catch(AUD_Exception& e) + { + PyErr_SetString(AUDError, e.str); + return NULL; + } +} + PyDoc_STRVAR(M_aud_Device_lock_doc, "lock()\n\n" "Locks the device so that it's guaranteed, that no samples are " @@ -2295,6 +2314,9 @@ static PyMethodDef Device_methods[] = { {"play", (PyCFunction)Device_play, METH_VARARGS | METH_KEYWORDS, M_aud_Device_play_doc }, + {"stopAll", (PyCFunction)Device_stopAll, METH_NOARGS, + M_aud_Device_stopAll_doc + }, {"lock", (PyCFunction)Device_lock, METH_NOARGS, M_aud_Device_lock_doc }, |