[Orxonox-commit 3838] r8514 - code/trunk/src/orxonox/sound
youngk at orxonox.net
youngk at orxonox.net
Thu May 19 17:32:25 CEST 2011
Author: youngk
Date: 2011-05-19 17:32:25 +0200 (Thu, 19 May 2011)
New Revision: 8514
Modified:
code/trunk/src/orxonox/sound/BaseSound.cc
code/trunk/src/orxonox/sound/SoundManager.cc
Log:
Testing commit: Sound
Modified: code/trunk/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/trunk/src/orxonox/sound/BaseSound.cc 2011-05-19 14:16:55 UTC (rev 8513)
+++ code/trunk/src/orxonox/sound/BaseSound.cc 2011-05-19 15:32:25 UTC (rev 8514)
@@ -50,11 +50,18 @@
, pitch_ (1.0)
{
RegisterRootObject(BaseSound);
+
+ if (int error = alGetError())
+ COUT(4) << "Sound: Received ALError before alIsSource(): " << SoundManager::getALErrorString(error) << std::endl;
// Initialise audioSource_ to a value that is not a source
// 0 is unfortunately not guaranteed to be no source ID.
- this->audioSource_ = 123456789;
+ // HACK!
+ this->audioSource_ = 0;
while (alIsSource(++this->audioSource_));
+
+ if (int error = alGetError())
+ COUT(4) << "Sound: Received ALError after alIsSource(): " << SoundManager::getALErrorString(error) << std::endl;
}
BaseSound::~BaseSound()
@@ -164,7 +171,7 @@
{
if (alIsSource(this->audioSource_))
{
- float volume = this->volume_ * this->getRealVolume();
+ float volume = this->volume_ * this->getRealVolume();
alSourcef(this->audioSource_, AL_GAIN, volume);
if (int error = alGetError())
COUT(2) << "Sound: Error setting volume to " << volume
Modified: code/trunk/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/trunk/src/orxonox/sound/SoundManager.cc 2011-05-19 14:16:55 UTC (rev 8513)
+++ code/trunk/src/orxonox/sound/SoundManager.cc 2011-05-19 15:32:25 UTC (rev 8514)
@@ -73,9 +73,12 @@
this->bDestructorCalled_ = false;
// Clear error messages (might be problematic on some systems)
- alGetError();
- alutGetError();
-
+ //alGetError();
+ //alutGetError();
+
+ if (int error = alGetError())
+ COUT(0) << "SOUND_DEBUG: Received ALError in constructor of SoundManager: " << SoundManager::getALErrorString(error) << std::endl;
+
// See whether we even want to load
bool bDisableSound_ = false;
SetConfigValue(bDisableSound_, false);
More information about the Orxonox-commit
mailing list