Package: blender
Version: 2.36-1
Severity: serious
Tags: patch

blender fails to build because there are some invalid conversions and
a call of an undeclared function:

> g++ -pipe -funsigned-char -O2 -Wall -W -DGAMEBLENDER=1 -DUSE_SUMO_SOLID 
> -DNDEBUG -Ibuild/linux2/intern/SoundSystem -Iintern/SoundSystem 
> -Iintern/SoundSystem -Ibuild/linux2/intern/SoundSystem/intern 
> -Iintern/SoundSystem/intern -Iintern/SoundSystem/intern 
> -Ibuild/linux2/intern/moto/include -Iintern/moto/include 
> -Iintern/moto/include -Ibuild/linux2/intern/string -Iintern/string 
> -Iintern/string -Ibuild/linux2/intern/SoundSystem/dummy 
> -Iintern/SoundSystem/dummy -Iintern/SoundSystem/dummy 
> -Ibuild/linux2/intern/SoundSystem/openal -Iintern/SoundSystem/openal 
> -Iintern/SoundSystem/openal -Ibuild/linux2/intern/SoundSystem/sdl 
> -Iintern/SoundSystem/sdl -Iintern/SoundSystem/sdl -I/usr/include 
> -I/usr/include/SDL -c -o 
> build/linux2/intern/SoundSystem/openal/SND_OpenALDevice.o 
> intern/SoundSystem/openal/SND_OpenALDevice.cpp
> intern/SoundSystem/openal/SND_OpenALDevice.cpp: In member function 'virtual 
> SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String&, void*, int)':
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:426: error: invalid conversion 
> from 'signed char*' to 'ALbyte*'
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:426: error:   initializing 
> argument 1 of 'void alutLoadWAVMemory(ALbyte*, ALenum*, ALvoid**, ALsizei*, 
> ALsizei*, ALboolean*)'
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:441: error: 'alutLoadWAV' was 
> not declared in this scope
> intern/SoundSystem/openal/SND_OpenALDevice.cpp: At global scope:
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:505: warning: unused parameter 
> 'rollofffactor'
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:680: warning: unused parameter 
> 'id'
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:680: warning: unused parameter 
> 'loopstart'
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:680: warning: unused parameter 
> 'loopend'
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:732: warning: unused parameter 
> 'orientation'
> intern/SoundSystem/openal/SND_OpenALDevice.cpp:732: warning: unused parameter 
> 'lisposition'

The attached patch, extracted from upstream, fixes these problems by
fixing the conversions and using alutLoadWAVFile instead of
alutLoadWAV.

-- 
Matt
only in patch2:
unchanged:
--- blender-2.36.orig/intern/SoundSystem/openal/SND_OpenALDevice.cpp
+++ blender-2.36/intern/SoundSystem/openal/SND_OpenALDevice.cpp
@@ -423,7 +423,7 @@
 #if defined(OUDE_OPENAL) || defined (__APPLE__)
                                        alutLoadWAVMemory((char*)memlocation, 
&sampleformat, &data, &numberofsamples, &samplerate);                           
  //      openal_2.12
 #else
-                                       alutLoadWAVMemory((signed 
char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, 
&loop);//     openal_2.14+
+                                       alutLoadWAVMemory((ALbyte*)memlocation, 
&sampleformat, &data, &numberofsamples, &samplerate, &loop);//  openal_2.14+
 #endif
                                        /* put it in the buffer */
                                        alBufferData(m_buffers[buffer], 
sampleformat, data, numberofsamples, samplerate);
@@ -433,12 +433,8 @@
                                {
 #ifdef __APPLE__
                                        alutLoadWAVFile((signed 
char*)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate);
-#elif defined(WIN32)
-                                       alutLoadWAVFile((signed 
char*)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate, 
&loop);
 #else
-                                       alutLoadWAV((char*)samplename.Ptr(), 
&data,
-                                               &sampleformat, &numberofsamples,
-                                               &samplerate, &frequency);
+                                       
alutLoadWAVFile((ALbyte*)samplename.Ptr(), &sampleformat, &data, 
&numberofsamples, &samplerate, &loop);
 #endif
                                        /* put it in the buffer */
                                        alBufferData(m_buffers[buffer], 
sampleformat, data, numberofsamples, samplerate);

Attachment: signature.asc
Description: Digital signature

Reply via email to