[Bf-blender-cvs] [f700c1f] master: Audaspace: name fixes and external library update.

Jörg Müller noreply at git.blender.org
Tue Jul 28 14:10:23 CEST 2015


Commit: f700c1f3a826ad7d2576822779f676a9b16fde7a
Author: Jörg Müller
Date:   Tue Apr 21 15:20:19 2015 +0200
Branches: master
https://developer.blender.org/rBf700c1f3a826ad7d2576822779f676a9b16fde7a

Audaspace: name fixes and external library update.

===================================================================

M	intern/audaspace/intern/AUD_PyInit.cpp
M	source/blender/blenkernel/intern/sound.c
M	source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
M	source/gameengine/GamePlayer/ghost/GPG_Application.cpp
M	source/gameengine/Ketsji/KX_SoundActuator.cpp

===================================================================

diff --git a/intern/audaspace/intern/AUD_PyInit.cpp b/intern/audaspace/intern/AUD_PyInit.cpp
index 2575ec7..5e89d88 100644
--- a/intern/audaspace/intern/AUD_PyInit.cpp
+++ b/intern/audaspace/intern/AUD_PyInit.cpp
@@ -33,7 +33,7 @@
 #include <audaspace/python/PyAPI.h>
 
 extern "C" {
-extern void *sound_get_factory(void *sound);
+extern void *BKE_sound_get_factory(void *sound);
 }
 
 static PyObject *AUD_getSoundFromPointer(PyObject *self, PyObject *args)
@@ -42,7 +42,7 @@ static PyObject *AUD_getSoundFromPointer(PyObject *self, PyObject *args)
 
 	if (PyArg_Parse(args, "l:_sound_from_pointer", &lptr)) {
 		if (lptr) {
-			AUD_Sound* sound = sound_get_factory((void *) lptr);
+			AUD_Sound* sound = BKE_sound_get_factory((void *) lptr);
 
 			if (sound) {
 				Sound *obj = (Sound *)Sound_empty();
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index a7346c8..db92e0e 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -182,7 +182,7 @@ void BKE_sound_init_once(void)
 
 static AUD_Device* sound_device;
 
-void* sound_get_device(void)
+void* BKE_sound_get_device(void)
 {
 	return sound_device;
 }
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 93ef1fa8c..7dfefb0 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -505,7 +505,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
 				ketsjiengine->InitDome(scene->gm.dome.res, scene->gm.dome.mode, scene->gm.dome.angle, scene->gm.dome.resbuf, scene->gm.dome.tilt, scene->gm.dome.warptext);
 
 			// initialize 3D Audio Settings
-			AUD_Device* device = sound_get_device();
+			AUD_Device* device = BKE_sound_get_device();
 			AUD_Device_setSpeedOfSound(device, scene->audio.speed_of_sound);
 			AUD_Device_setDopplerFactor(device, scene->audio.doppler_factor);
 			AUD_Device_setDistanceModel(device, AUD_DistanceModel(scene->audio.distance_model));
@@ -675,7 +675,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
 		}
 
 		// stop all remaining playing sounds
-		AUD_Device_stopAll(sound_get_device());
+		AUD_Device_stopAll(BKE_sound_get_device());
 	
 	} while (exitrequested == KX_EXIT_REQUEST_RESTART_GAME || exitrequested == KX_EXIT_REQUEST_START_OTHER_GAME);
 	
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 75a3012..a0c3142 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -748,9 +748,10 @@ bool GPG_Application::startEngine(void)
 			m_ketsjiengine->InitDome(m_startScene->gm.dome.res, m_startScene->gm.dome.mode, m_startScene->gm.dome.angle, m_startScene->gm.dome.resbuf, m_startScene->gm.dome.tilt, m_startScene->gm.dome.warptext);
 
 		// initialize 3D Audio Settings
-		AUD_setSpeedOfSound(m_startScene->audio.speed_of_sound);
-		AUD_setDopplerFactor(m_startScene->audio.doppler_factor);
-		AUD_setDistanceModel(AUD_DistanceModel(m_startScene->audio.distance_model));
+		AUD_Device* device = BKE_sound_get_device();
+		AUD_Device_setSpeedOfSound(device, m_startScene->audio.speed_of_sound);
+		AUD_Device_setDopplerFactor(device, m_startScene->audio.doppler_factor);
+		AUD_Device_setDistanceModel(device, AUD_DistanceModel(m_startScene->audio.distance_model));
 
 #ifdef WITH_PYTHON
 		// Set the GameLogic.globalDict from marshal'd data, so we can
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index 69821fc..8f225e4 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -122,7 +122,7 @@ void KX_SoundActuator::play()
 		break;
 	}
 
-	//m_handle = AUD_Device_play(sound_get_device(), sound, false);
+	//m_handle = AUD_Device_play(BKE_sound_get_device(), sound, false);
 
 	// in case of pingpong, we have to free the sound
 	if(sound != m_sound)




More information about the Bf-blender-cvs mailing list