[Orxonox-commit 1791] r6509 - code/branches/sound5/src/orxonox/sound

erwin at orxonox.net erwin at orxonox.net
Thu Mar 11 15:58:42 CET 2010


Author: erwin
Date: 2010-03-11 15:58:42 +0100 (Thu, 11 Mar 2010)
New Revision: 6509

Modified:
   code/branches/sound5/src/orxonox/sound/AmbientSound.cc
Log:
Committing spreeeee! Hardcoded source init

Modified: code/branches/sound5/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/branches/sound5/src/orxonox/sound/AmbientSound.cc	2010-03-11 14:47:35 UTC (rev 6508)
+++ code/branches/sound5/src/orxonox/sound/AmbientSound.cc	2010-03-11 14:58:42 UTC (rev 6509)
@@ -171,7 +171,15 @@
         DataStreamPtr dataStream = Resource::open(fileInfo);
 
         this->soundstreamthread_ = boost::thread(SoundStreamer(), this->audioSource_, dataStream);
-        this->initialiseSource();
+
+        this->updateVolume();
+        this->setPitch(this->getPitch());
+        this->setLooping(this->getLooping());
+        alSource3f(this->audioSource_, AL_POSITION,  0, 0, 0);
+        alSource3f(this->audioSource_, AL_VELOCITY,  0, 0, 0);
+        alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0);
+        if (ALint error = alGetError())
+            COUT(2) << "Sound: Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl;
     }
 
     void AmbientSound::doStop()




More information about the Orxonox-commit mailing list