]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.cxx
add the option to tie a SampleGroup to the listener position and orientation
[simgear.git] / simgear / sound / soundmgr_openal.cxx
index 9bc3e2a098fb84f6cdbcbea25936896a0eaca48f..98d7354b364f6ed1808074185d5435397795d27c 100644 (file)
@@ -204,7 +204,7 @@ void SGSoundMgr::update( double dt )
 // run the audio scheduler
 void SGSoundMgr::update_late( double dt ) {
     if (_working) {
-        // alcSuspendContext(_context);
+        alcSuspendContext(_context);
 
         sample_group_map_iterator sample_grp_current = _sample_groups.begin();
         sample_group_map_iterator sample_grp_end = _sample_groups.end();
@@ -222,7 +222,7 @@ void SGSoundMgr::update_late( double dt ) {
             testForALError("update");
             _changed = false;
         }
-        // alcProcessContext(_context);
+        alcProcessContext(_context);
     }
 }
 
@@ -458,6 +458,7 @@ bool SGSoundMgr::testForALCError(string s)
 
 bool SGSoundMgr::testForALUTError(string s)
 {
+#if defined(ALUT_API_MAJOR_VERSION) && ALUT_API_MAJOR_VERSION >= 1
     ALenum error;
     error =  alutGetError ();
     if (error != ALUT_ERROR_NO_ERROR) {
@@ -466,5 +467,6 @@ bool SGSoundMgr::testForALUTError(string s)
                                        << s);
         return true;
     }
+#endif
     return false;
 }