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:
authorTom Musgrove <LetterRip@gmail.com>2006-01-28 22:57:09 +0300
committerTom Musgrove <LetterRip@gmail.com>2006-01-28 22:57:09 +0300
commit2fbef6f9c9224450f4de567466c5b573dc1ec062 (patch)
tree55a20b0670ad15981d454ec98f6c381ba6103b43 /intern/SoundSystem
parent8347dd2560d621a3f3a42dfae0052b1302eb6f7f (diff)
==compiling==
need this version to compile with cygwin...
Diffstat (limited to 'intern/SoundSystem')
-rw-r--r--intern/SoundSystem/openal/SND_OpenALDevice.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
index 28421b9f2e4..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;
}
@@ -410,7 +418,7 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
waveslot->SetFileSize(size);
/* what was (our) buffer? */
- buffer = waveslot->GetBuffer();
+ int buffer = waveslot->GetBuffer();
/* get some info out of the sample */
SND_GetSampleInfo((signed char*)memlocation, waveslot);
@@ -419,9 +427,14 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
/* load the sample into openal */
#if defined(OUDE_OPENAL) || defined (__APPLE__)
- alutLoadWAVMemory((ALbyte *)memlocation, &sampleformat, &data, &numberofsamples, &samplerate); // openal_2.12
+ 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((ALbyte *)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+
+ 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);