Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2009-08-10 19:39:11 +0400
committerJoerg Mueller <nexyon@gmail.com>2009-08-10 19:39:11 +0400
commita27cc1adf0ef41ee71c9459df940c6fa3c578eea (patch)
tree1415513cb30751799f654d7e4f0147e5e2601eaa /source/gameengine/Ketsji/KX_PythonInit.cpp
parentcb9e51bf8a2b490c7e18dc88e8206b7a3ebd0038 (diff)
2.5 audio cleanup:
* Removed CD Actuator * Removed bSample and bSoundListener * Removed SoundSystem * Removed -noaudio parameter
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp61
1 files changed, 6 insertions, 55 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index d8027a4d9fc..0eef33f927e 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -79,7 +79,6 @@ extern "C" {
#include "ListValue.h"
#include "InputParser.h"
#include "KX_Scene.h"
-#include "SND_DeviceManager.h"
#include "NG_NetworkScene.h" //Needed for sendMessage()
@@ -212,69 +211,21 @@ static bool usedsp = false;
// this gets a pointer to an array filled with floats
static PyObject* gPyGetSpectrum(PyObject*)
{
- SND_IAudioDevice* audiodevice = SND_DeviceManager::Instance();
-
PyObject* resultlist = PyList_New(512);
- if (audiodevice)
- {
- if (!usedsp)
- {
- audiodevice->StartUsingDSP();
- usedsp = true;
- }
-
- float* spectrum = audiodevice->GetSpectrum();
-
- for (int index = 0; index < 512; index++)
- {
- PyList_SET_ITEM(resultlist, index, PyFloat_FromDouble(spectrum[index]));
- }
- }
- else {
- for (int index = 0; index < 512; index++)
- {
- PyList_SET_ITEM(resultlist, index, PyFloat_FromDouble(0.0));
- }
- }
+ for (int index = 0; index < 512; index++)
+ {
+ PyList_SET_ITEM(resultlist, index, PyFloat_FromDouble(0.0));
+ }
return resultlist;
}
-#if 0 // unused
-static PyObject* gPyStartDSP(PyObject*, PyObject* args)
-{
- SND_IAudioDevice* audiodevice = SND_DeviceManager::Instance();
-
- if (!audiodevice) {
- PyErr_SetString(PyExc_RuntimeError, "no audio device available");
- return NULL;
- }
-
- if (!usedsp) {
- audiodevice->StartUsingDSP();
- usedsp = true;
- }
-
- Py_RETURN_NONE;
-}
-#endif
-
-
static PyObject* gPyStopDSP(PyObject*, PyObject* args)
{
- SND_IAudioDevice* audiodevice = SND_DeviceManager::Instance();
-
- if (!audiodevice) {
- PyErr_SetString(PyExc_RuntimeError, "no audio device available");
- return NULL;
- }
-
- if (usedsp) {
- audiodevice->StopUsingDSP();
- usedsp = true;
- }
+ PyErr_SetString(PyExc_RuntimeError, "no audio device available");
+ return NULL;
Py_RETURN_NONE;
}