]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.cxx
MingW/MSYS fix
[simgear.git] / simgear / sound / soundmgr_openal.cxx
index e9e2dfbcdac0e757d701591303e8259ca5f8de45..bfdda68210b1e660c8e68e238890e3adb595125a 100644 (file)
@@ -42,12 +42,12 @@ inline int (isinf)(double r) { return isinf(r); }
 inline int (isnan)(double r) { return isnan(r); } 
 #endif
 
-#if defined(__MINGW32__)
-#define isnan(x) _isnan(x)
-#endif
-
 #if defined (__FreeBSD__)
-inline int isnan(double r) { return !(r <= 0 || r >= 0); }
+#  if __FreeBSD_version < 500000
+     extern "C" {
+       inline int isnan(double r) { return !(r <= 0 || r >= 0); }
+     }
+#  endif
 #endif
 
 #include STL_IOSTREAM
@@ -57,6 +57,9 @@ inline int isnan(double r) { return !(r <= 0 || r >= 0); }
 
 #include "soundmgr_openal.hxx"
 
+#if defined(__MINGW32__)
+#define isnan(x) _isnan(x)
+#endif
 
 //
 // Sound Manager
@@ -93,6 +96,7 @@ SGSoundMgr::SGSoundMgr() {
     listener_ori[4] = 1.0;
     listener_ori[5] = 0.0;
 
+    alListenerf( AL_GAIN, 0.0f );
     alListenerfv( AL_POSITION, listener_pos );
     alListenerfv( AL_VELOCITY, listener_vel );
     alListenerfv( AL_ORIENTATION, listener_ori );