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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-18 00:44:58 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-18 00:44:58 +0300
commitd52400bfbd2a7e4d09b5a71bc461a554d232af15 (patch)
tree08815f065fc90aac0ae62ae5f3a89d20e19399e6 /intern/SoundSystem
parent1ac0d54fea831c485e8e27e8bfa887e15beb58de (diff)
parent28f6d223d079b1e5cb67e3fc22fb7f818deb8dcb (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes: * Sequence transform strip uses G.scene global, this is commented out now, should be fixed. * Etch-a-ton code was most difficult to merge. The files already in 2.5 got merged, but no new files were added. Calls to these files are commented out with "XXX etch-a-ton". editarmature.c and transform_snap.c were complex to merge. Martin, please check? * Game engine compiles and links again here for scons/make/cmake (player still fails to link).
Diffstat (limited to 'intern/SoundSystem')
-rw-r--r--intern/SoundSystem/openal/SND_OpenALDevice.cpp14
-rw-r--r--intern/SoundSystem/openal/SND_OpenALDevice.h2
-rw-r--r--intern/SoundSystem/sdl/SND_SDLCDDevice.h2
3 files changed, 14 insertions, 4 deletions
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
index c660e9aecba..9ce30f985ac 100644
--- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp
+++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
@@ -235,7 +235,8 @@ SND_OpenALDevice::SND_OpenALDevice()
if (m_context) {
#ifdef AL_VERSION_1_1
- alcMakeContextCurrent((ALCcontext*)m_context);
+ alcMakeContextCurrent((ALCcontext*)m_context);
+ alutInitWithoutContext(NULL, NULL); /* in this case we dont want alut to initialize the context, see above */
#else
alcMakeContextCurrent(m_context);
#endif
@@ -380,6 +381,9 @@ SND_OpenALDevice::~SND_OpenALDevice()
#else
if (m_device)
alcCloseDevice((ALCdevice*) m_device);
+#ifdef AL_VERSION_1_1
+ alutExit();
+#endif
#endif
}
@@ -437,7 +441,9 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
alutLoadWAVMemory((char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate); // openal_2.12
#else
#ifdef AL_VERSION_1_1
- alutLoadWAVMemory((ALbyte*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+
+ float frequency = 0.0f;
+ data = alutLoadMemoryFromFileImage(memlocation, size, &sampleformat, &numberofsamples, &frequency);
+ samplerate = (int)frequency;
#else
alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+
@@ -480,7 +486,11 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
}
/* and free the original stuff (copy was made in openal) */
+#if defined(OUDE_OPENAL) || defined (__APPLE__) || !defined(AL_VERSION_1_1)
alutUnloadWAV(sampleformat, data, numberofsamples, samplerate);
+#else
+ free(data);
+#endif
}
}
else
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.h b/intern/SoundSystem/openal/SND_OpenALDevice.h
index b8c64762a56..a7b97cc314f 100644
--- a/intern/SoundSystem/openal/SND_OpenALDevice.h
+++ b/intern/SoundSystem/openal/SND_OpenALDevice.h
@@ -32,7 +32,7 @@
#include "SND_AudioDevice.h"
#include "SoundDefines.h"
-typedef struct SDL_CD;
+struct SDL_CD;
class SND_OpenALDevice : public SND_AudioDevice
{
diff --git a/intern/SoundSystem/sdl/SND_SDLCDDevice.h b/intern/SoundSystem/sdl/SND_SDLCDDevice.h
index 15cb1975d74..96600d53630 100644
--- a/intern/SoundSystem/sdl/SND_SDLCDDevice.h
+++ b/intern/SoundSystem/sdl/SND_SDLCDDevice.h
@@ -29,7 +29,7 @@
#ifndef SND_SDLCDDEVICE
#define SND_SDLCDDEVICE
-typedef struct SDL_CD;
+struct SDL_CD;
class SND_SDLCDDevice
{