Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2011, 5:32:25 PM (13 years ago)
Author:
youngk
Message:

Testing commit: Sound

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/sound/BaseSound.cc

    r7858 r8514  
    5151    {
    5252        RegisterRootObject(BaseSound);
     53       
     54        if (int error = alGetError())
     55            COUT(4) << "Sound: Received ALError before alIsSource(): " << SoundManager::getALErrorString(error) << std::endl;
    5356
    5457        // Initialise audioSource_ to a value that is not a source
    5558        // 0 is unfortunately not guaranteed to be no source ID.
    56         this->audioSource_ = 123456789;
     59        // HACK!
     60        this->audioSource_ = 0;
    5761        while (alIsSource(++this->audioSource_));
     62       
     63        if (int error = alGetError())
     64            COUT(4) << "Sound: Received ALError after alIsSource(): " << SoundManager::getALErrorString(error) << std::endl;
    5865    }
    5966
     
    165172        if (alIsSource(this->audioSource_))
    166173        {
    167             float volume = this->volume_ * this->getRealVolume();
     174            float volume = this->volume_ * this->getRealVolume();               
    168175            alSourcef(this->audioSource_, AL_GAIN, volume);
    169176            if (int error = alGetError())
Note: See TracChangeset for help on using the changeset viewer.