[Orxonox-commit 2053] r6769 - code/branches/sound5/src/orxonox/sound
erwin at orxonox.net
erwin at orxonox.net
Thu Apr 22 15:32:45 CEST 2010
Author: erwin
Date: 2010-04-22 15:32:45 +0200 (Thu, 22 Apr 2010)
New Revision: 6769
Modified:
code/branches/sound5/src/orxonox/sound/AmbientSound.cc
code/branches/sound5/src/orxonox/sound/SoundStreamer.cc
Log:
Fixed a possible source for future problems. but still no sounds. Try everything in one thread with the same result
Modified: code/branches/sound5/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/branches/sound5/src/orxonox/sound/AmbientSound.cc 2010-04-22 13:09:29 UTC (rev 6768)
+++ code/branches/sound5/src/orxonox/sound/AmbientSound.cc 2010-04-22 13:32:45 UTC (rev 6769)
@@ -154,7 +154,9 @@
return;
}
- this->audioSource_ = SoundManager::getInstance().getSoundSource(this);
+ if(!alIsSource(this->audioSource_))
+ this->audioSource_ = SoundManager::getInstance().getSoundSource(this);
+
if (this->source_ == source)
{
return;
@@ -182,7 +184,9 @@
this->soundstreamthread_ = boost::thread(SoundStreamer(), this->audioSource_, dataStream);
if(this->soundstreamthread_ == boost::thread())
COUT(2) << "Sound: Failed to create thread." << std::endl;
-
+ //SoundStreamer streamer;
+ //streamer(this->audioSource_, dataStream);
+
alSource3f(this->audioSource_, AL_POSITION, 0, 0, 0);
alSource3f(this->audioSource_, AL_VELOCITY, 0, 0, 0);
alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0);
Modified: code/branches/sound5/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- code/branches/sound5/src/orxonox/sound/SoundStreamer.cc 2010-04-22 13:09:29 UTC (rev 6768)
+++ code/branches/sound5/src/orxonox/sound/SoundStreamer.cc 2010-04-22 13:32:45 UTC (rev 6769)
@@ -103,11 +103,11 @@
}
}
- alSourcei(audioSource, AL_LOOPING, AL_TRUE);
+ //alSourcei(audioSource, AL_LOOPING, AL_TRUE);
alSourcePlay(audioSource);
if(ALint error = alGetError())
- COUT(2) << "Sound: Could not start ambient sound" << std::endl;
+ COUT(2) << "Sound: Could not start ambient sound" << getALErrorString(error) << std::endl;
while(true) // Stream forever, control through thread control
{
More information about the Orxonox-commit
mailing list