]> git.mxchange.org Git - simgear.git/commitdiff
Fix two OpenAL related compiler errors
authorErik Hofman <erik@ehofman.com>
Fri, 27 May 2016 17:08:20 +0000 (19:08 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
CMakeLists.txt
simgear/simgear_config_cmake.h.in
simgear/sound/soundmgr_openal.cxx
simgear/sound/soundmgr_openal_private.hxx

index 767749234f2e3dd92c23481f872b2d043a34dfb7..90dfc810f9eeb97db58cc7bf5404387be3292940 100644 (file)
@@ -243,6 +243,7 @@ check_include_file(sys/time.h HAVE_SYS_TIME_H)
 check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
 check_include_file(unistd.h HAVE_UNISTD_H)
 check_include_file(windows.h HAVE_WINDOWS_H)
+check_include_file(AL/alext.h HAVE_AL_EXT_H)
 
 if(HAVE_INTTYPES_H)
   # ShivaVG needs inttypes.h
index 0cce4b316c83ee8ed7a40bbd833309fd33a63444..c9804e7c9c30367b2e989dfa5945aae7806d526b 100644 (file)
@@ -13,6 +13,8 @@
 #cmakedefine HAVE_STD_ISNAN
 #cmakedefine HAVE_WINDOWS_H
 #cmakedefine HAVE_MKDTEMP
+#cmakedefine HAVE_AL_EXT_H
+
 
 #cmakedefine GCC_ATOMIC_BUILTINS_FOUND
 
index 68147b0b39c01c9d00cdab7f7d1342844f2033e0..1dfbafa7b128c508794af30ffb39ff95085a0276 100644 (file)
@@ -762,7 +762,7 @@ bool SGSoundMgr::load( const std::string &samplepath,
     if ( !is_working() )
         return false;
 
-    ALenum format;
+    unsigned int format;
     ALsizei size;
     ALsizei freq;
     ALvoid *data;
index 6bc3591f76a999a8b2886098a39d2d6484e13048..d1b4f85a67a51a462b8ff8503b88b6776f4ad2e1 100644 (file)
 #ifndef _SG_SOUNDMGR_OPENAL_PRIVATE_HXX
 #define _SG_SOUNDMGR_OPENAL_PRIVATE_HXX 1
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include <string>
 #include <vector>
 #include <map>
 #if defined(__APPLE__)
 # include <OpenAL/al.h>
 # include <OpenAL/alc.h>
-# include <OpenAL/alext.h>
 #elif defined(OPENALSDK)
 # include <al.h>
 # include <alc.h>
-# include <alext.h>
 #else
 # include <AL/al.h>
 # include <AL/alc.h>
-# include <AL/alext.h>
+# ifdef HAVE_AL_EXT_H
+#  include <AL/alext.h>
+# endif
 #endif
 
 #include <simgear/structure/SGSharedPtr.hxx>