diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-01-07 03:14:37 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-01-07 03:14:37 +0300 |
commit | bed24bc299616f8ee05762a15d083b56df6b3450 (patch) | |
tree | 1f0438f43fa6ad1120dfe3e1b6b21d7762efa2dc /intern | |
parent | 524ea29aaa77922ff123b04deaabed19517214e7 (diff) |
more work to get armatures/blender materials to work under non-windows platforms
Diffstat (limited to 'intern')
-rw-r--r-- | intern/SoundSystem/openal/SND_OpenALDevice.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp index 75dbd3ee33b..98eed6bb104 100644 --- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp +++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp @@ -231,8 +231,12 @@ SND_OpenALDevice::SND_OpenALDevice() m_context = alcCreateContext(dev, NULL); if (m_context) { - alcMakeContextCurrent((ALCcontext*)m_context); - m_audio = true; +#ifdef AL_VERSION_1_1 + alcMakeContextCurrent((ALCcontext*)m_context); +#else + alcMakeContextCurrent(m_context); +#endif + m_audio = true; m_device = dev; #ifdef __linux__ /* @@ -339,7 +343,11 @@ SND_OpenALDevice::~SND_OpenALDevice() if (m_context) { MakeCurrent(); +#ifdef AL_VERSION_1_1 alcDestroyContext((ALCcontext*)m_context); +#else + alcDestroyContext(m_context); +#endif m_context = NULL; } @@ -421,7 +429,12 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name, #if defined(OUDE_OPENAL) || defined (__APPLE__) 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+ +#else + alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+ + +#endif #endif /* put it in the buffer */ alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate); |