[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15842] branches/sound-branch: Fixed game engine dependencies.
Robert Holcomb
bob_holcomb at hotmail.com
Mon Jul 28 16:12:52 CEST 2008
Revision: 15842
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15842
Author: scourage
Date: 2008-07-28 16:12:48 +0200 (Mon, 28 Jul 2008)
Log Message:
-----------
Fixed game engine dependencies. Only dependent on libsoundsystem now.
Modified Paths:
--------------
branches/sound-branch/intern/soundsystem/SND_internal.h
branches/sound-branch/projectfiles_vc7/blender/blender.vcproj
branches/sound-branch/projectfiles_vc7/gameengine/blenderhook/KX_blenderhook.vcproj
branches/sound-branch/source/blender/src/soundsystem.c
branches/sound-branch/source/gameengine/Audio/SND_GameScene.cpp
branches/sound-branch/source/gameengine/Audio/SND_GameScene.h
branches/sound-branch/source/gameengine/Audio/SND_GameSoundObject.cpp
branches/sound-branch/source/gameengine/Ketsji/KX_PythonInit.cpp
Modified: branches/sound-branch/intern/soundsystem/SND_internal.h
===================================================================
--- branches/sound-branch/intern/soundsystem/SND_internal.h 2008-07-28 13:14:35 UTC (rev 15841)
+++ branches/sound-branch/intern/soundsystem/SND_internal.h 2008-07-28 14:12:48 UTC (rev 15842)
@@ -90,21 +90,21 @@
SND_Device *mDevice;
int mDeviceTypeIndex;
- SND_DataMultiplexer *mDataMultiplexer;
+ SND_DataMultiplexer *mDataMultiplexer;
SND_FXMixer *mFXMixerLeft;
SND_FXMixer *mFXMixerRight;
SND_DataConsumer *mFileWriter;
SND_CallbackFunction *mCallbackFunction;
- void *mCallbackUserData1;
- void *mCallbackUserData2;
+ void *mCallbackUserData1;
+ void *mCallbackUserData2;
int mMixBufferSampleRate;
//3d listener stuff
- float mListenerGain;
- float mListenerDopplerVelocity;
- float mListenernDopplerFactor;
+ float mListenerGain;
+ float mListenerDopplerVelocity;
+ float mListenernDopplerFactor;
};
extern SND_Config gSndCfg;
Modified: branches/sound-branch/projectfiles_vc7/blender/blender.vcproj
===================================================================
--- branches/sound-branch/projectfiles_vc7/blender/blender.vcproj 2008-07-28 13:14:35 UTC (rev 15841)
+++ branches/sound-branch/projectfiles_vc7/blender/blender.vcproj 2008-07-28 14:12:48 UTC (rev 15842)
@@ -124,12 +124,12 @@
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386
"
- AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib libsoundsystem.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25_d.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib Imath.lib IlmImf.lib IlmThread.lib avcodec-51.lib avformat-52.lib avutil-49.lib swscale-0.lib glew.lib tinySND.lib libsamplerate.lib libsndfile-1.lib"
+ AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25_d.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib Imath.lib IlmImf.lib IlmThread.lib avcodec-51.lib avformat-52.lib avutil-49.lib swscale-0.lib glew.lib tinySND.lib libsamplerate.lib libsndfile-1.lib BL_src.lib libsoundsystem.lib"
ShowProgress="0"
OutputFile="..\..\bin\debug\blender.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openexr\lib;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_7\libs\intern\debug;..\..\..\build\msvc_7\libs\extern\debug;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib"
+ AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openexr\lib;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_7\libs\intern\debug;..\..\..\build\msvc_7\libs\extern\debug;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib;..\..\..\build\msvc_7\libs\debug"
IgnoreDefaultLibraryNames="libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, odbc32.lib, odbccp32.lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="..\..\..\build\msvc_7\libs\debug\blender.pdb"
Modified: branches/sound-branch/projectfiles_vc7/gameengine/blenderhook/KX_blenderhook.vcproj
===================================================================
--- branches/sound-branch/projectfiles_vc7/gameengine/blenderhook/KX_blenderhook.vcproj 2008-07-28 13:14:35 UTC (rev 15841)
+++ branches/sound-branch/projectfiles_vc7/gameengine/blenderhook/KX_blenderhook.vcproj 2008-07-28 14:12:48 UTC (rev 15842)
@@ -21,7 +21,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\moto\include;..\..\..\..\build\msvc_7\intern\string\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\soundsystem\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\extern\solid\include;..\..\..\..\build\msvc_7\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\ketsji;..\..\..\source\gameengine\network;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Physics\Sumo;..\..\..\source\gameengine\Physics\common;..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\build\msvc_7\extern\tinySND\include;..\..\..\..\lib\windows\samplerate\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\moto\include;..\..\..\..\build\msvc_7\intern\string\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\soundsystem\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\extern\solid\include;..\..\..\..\build\msvc_7\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\ketsji;..\..\..\source\gameengine\network;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Physics\Sumo;..\..\..\source\gameengine\Physics\common;..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\build\msvc_7\extern\tinySND\include;..\..\..\..\lib\windows\samplerate\include;..\..\..\source\gameengine\Audio"
PreprocessorDefinitions="WIN32;_LIB;_DEBUG;WITH_GLEXT"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Modified: branches/sound-branch/source/blender/src/soundsystem.c
===================================================================
--- branches/sound-branch/source/blender/src/soundsystem.c 2008-07-28 13:14:35 UTC (rev 15841)
+++ branches/sound-branch/source/blender/src/soundsystem.c 2008-07-28 14:12:48 UTC (rev 15842)
@@ -288,10 +288,8 @@
void audio_sound_delete(struct bSound* sound)
{
- // UNIMPLEMENTED !!!!!!!
- // nobody calls this function yet
- // this is a completly new function
- // does not existed before the new soundsystem
+ //inital implementation
+ SND_SoundDelete(sound);
}
struct bSample* audio_sample_find( char *fname )
Modified: branches/sound-branch/source/gameengine/Audio/SND_GameScene.cpp
===================================================================
--- branches/sound-branch/source/gameengine/Audio/SND_GameScene.cpp 2008-07-28 13:14:35 UTC (rev 15841)
+++ branches/sound-branch/source/gameengine/Audio/SND_GameScene.cpp 2008-07-28 14:12:48 UTC (rev 15842)
@@ -49,14 +49,6 @@
#include <stdlib.h>
#include <iostream>
-
-extern struct bSound* audio_sound_new(const char *name);
-extern struct bSample* audio_sample_find(char *name);
-extern int audio_sound_isplaying(struct bSound *sound);
-extern void audio_sound_play(struct bSound *sound);
-extern void audio_sound_delete(struct bSound *sound);
-
-
SND_Scene::SND_Scene()
{
if(SND_IsInitialized()!=0)
@@ -86,14 +78,22 @@
int SND_Scene::LoadSample(STR_String& samplename)
{
- bSound* sound=audio_sound_new( samplename.Ptr() );
+ bSound* sound=(bSound*)SND_SoundNew(samplename.Ptr());
+ m_sounds.push_back(sound);
+
return (int)sound;
}
void SND_Scene::RemoveAllSamples()
{
- //depreciated
+ std::list<bSound*>::iterator iter = m_sounds.begin();
+ for(iter; iter!=m_sounds.end(); ++iter)
+ {
+ SND_SoundDelete((SND_SoundIHandle)(*iter));
+ }
+
+ m_sounds.clear();
}
bool SND_Scene::CheckBuffer(SND_SoundObject* pObject)
@@ -109,9 +109,16 @@
bool SND_Scene::IsSampleLoaded(STR_String& samplename)
{
- bSample* sample=audio_sample_find(samplename.Ptr());
-
- return sample!=NULL;
+ std::list<bSound*>::const_iterator iter=m_sounds.begin();
+ for(iter; iter!=m_sounds.end(); ++iter)
+ {
+ if(strcmp((*iter)->name, samplename.Ptr()))
+ {
+ return true;
+ }
+ }
+
+ return false;
}
void SND_Scene::AddObject(SND_SoundObject* pObject)
@@ -234,7 +241,7 @@
//play if it needs to be played
if (pObject->GetPlaystate() == SND_MUST_PLAY)
{
- audio_sound_play(pObject->m_bSound);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list