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-09-05 00:03:27 +0400
committerJoerg Mueller <nexyon@gmail.com>2009-09-05 00:03:27 +0400
commit944d0e908728d07a5a8da809baf448592ba9e701 (patch)
tree719d6adf8cd67891395fd681a5058e3fcdd3349f /source/gameengine/GamePlayer/ghost/GPG_Application.cpp
parent9303254e4f137c2810c5bc99ef1783fab249bc16 (diff)
Fixed sound stuff for gameplayer, no sound though as U.audiodevice is set to 0 (="No Audio").
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Application.cpp')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp36
1 files changed, 6 insertions, 30 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 879c2264247..8ec41968042 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -57,6 +57,7 @@ extern "C"
#include "BLO_readfile.h"
#include "BKE_global.h"
#include "BKE_main.h"
+#include "BKE_sound.h"
#include "IMB_imbuf.h"
#include "DNA_scene_types.h"
#ifdef __cplusplus
@@ -85,10 +86,6 @@ extern "C"
#include "KX_BlenderSceneConverter.h"
#include "NG_LoopBackNetworkDeviceInterface.h"
-#if 0 //XXX - ADD SOUND
- #include "SND_DeviceManager.h"
-#endif
-
#include "GPC_MouseDevice.h"
#include "GPC_RenderTools.h"
#include "GPG_Canvas.h"
@@ -128,8 +125,7 @@ GPG_Application::GPG_Application(GHOST_ISystem* system)
m_rendertools(0),
m_rasterizer(0),
m_sceneconverter(0),
- m_networkdevice(0),
- m_audiodevice(0),
+ m_networkdevice(0),
m_blendermat(0),
m_blenderglslmat(0),
m_pyGlobalDictString(0),
@@ -587,15 +583,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
if (!m_networkdevice)
goto initFailed;
-#if 0 //XXX - ADD SOUND
- // get an audiodevice
- SND_DeviceManager::Subscribe();
- m_audiodevice = SND_DeviceManager::Instance();
- if (!m_audiodevice)
- goto initFailed;
- m_audiodevice->UseCD();
-#endif
-
+ sound_init();
// create a ketsjisystem (only needed for timing and stuff)
m_kxsystem = new GPG_System (m_system);
@@ -613,9 +601,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
m_ketsjiengine->SetRenderTools(m_rendertools);
m_ketsjiengine->SetRasterizer(m_rasterizer);
m_ketsjiengine->SetNetworkDevice(m_networkdevice);
-#if 0 //XXX - ADD SOUND
- m_ketsjiengine->SetAudioDevice(m_audiodevice);
-#endif
+
m_ketsjiengine->SetTimingDisplay(frameRate, false, false);
CValue::SetDeprecationWarnings(nodepwarnings);
@@ -628,10 +614,8 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
return m_engineInitialized;
initFailed:
+ sound_exit();
delete m_kxsystem;
-#if 0 // XXX - ADD SOUND
- delete m_audiodevice;
-#endif
delete m_networkdevice;
delete m_mouse;
delete m_keyboard;
@@ -644,7 +628,6 @@ initFailed:
m_keyboard = NULL;
m_mouse = NULL;
m_networkdevice = NULL;
- m_audiodevice = NULL;
m_kxsystem = NULL;
return false;
}
@@ -690,7 +673,6 @@ bool GPG_Application::startEngine(void)
KX_Scene* startscene = new KX_Scene(m_keyboard,
m_mouse,
m_networkdevice,
-// m_audiodevice, // XXX ADD SOUND
startscenename,
m_startScene);
@@ -780,6 +762,7 @@ void GPG_Application::stopEngine()
void GPG_Application::exitEngine()
{
+ sound_exit();
if (m_ketsjiengine)
{
stopEngine();
@@ -791,13 +774,6 @@ void GPG_Application::exitEngine()
delete m_kxsystem;
m_kxsystem = 0;
}
- if (m_audiodevice)
- {
-#if 0 //XXX - ADD SOUND
- SND_DeviceManager::Unsubscribe();
- m_audiodevice = 0;
-#endif
- }
if (m_networkdevice)
{
delete m_networkdevice;