[Orxonox-commit 1553] r6271 - code/branches/presentation2/src/orxonox/sound

rgrieder at orxonox.net rgrieder at orxonox.net
Tue Dec 8 10:15:04 CET 2009


Author: rgrieder
Date: 2009-12-08 10:15:04 +0100 (Tue, 08 Dec 2009)
New Revision: 6271

Modified:
   code/branches/presentation2/src/orxonox/sound/BaseSound.cc
   code/branches/presentation2/src/orxonox/sound/SoundManager.cc
Log:
- alProcessContext isn't necessary after all: the operation is even allowed to result in NOP.
- Adjusted distance model in BaseSound so you can hear the sounds better.

Modified: code/branches/presentation2/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/presentation2/src/orxonox/sound/BaseSound.cc	2009-12-08 09:09:39 UTC (rev 6270)
+++ code/branches/presentation2/src/orxonox/sound/BaseSound.cc	2009-12-08 09:15:04 UTC (rev 6271)
@@ -56,6 +56,12 @@
             alGenSources(1, &this->audioSource_);
             if (!alIsSource(this->audioSource_))
                 COUT(1) << "Sound: Source generation failed: " << SoundManager::getALErrorString(alGetError()) << std::endl;
+
+            if (alIsSource(this->audioSource_))
+            {
+                alSourcei(this->audioSource_, AL_REFERENCE_DISTANCE, 20);
+                alSourcei(this->audioSource_, AL_MAX_DISTANCE, 300);
+            }
         }
     }
 

Modified: code/branches/presentation2/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/presentation2/src/orxonox/sound/SoundManager.cc	2009-12-08 09:09:39 UTC (rev 6270)
+++ code/branches/presentation2/src/orxonox/sound/SoundManager.cc	2009-12-08 09:15:04 UTC (rev 6271)
@@ -153,7 +153,6 @@
     void SoundManager::preUpdate(const Clock& time)
     {
         this->processCrossFading(time.getDeltaTime());
-        alcProcessContext(this->context_);
     }
 
     void SoundManager::setConfigValues()




More information about the Orxonox-commit mailing list