Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 11, 2011, 4:05:55 PM (13 years ago)
Author:
landauf
Message:

fixed (?) an endless loop in SoundManager::preUpdate if a non-looping ambient sound faded out. maybe solved the problem by returning a bool from stop() depending on whether or not the sound source was destroyed.

someone who knows more about the sound system should probably have a look at this.

File:
1 edited

Legend:

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

    r7163 r7856  
    9696    }
    9797
    98     void BaseSound::doStop()
     98    bool BaseSound::doStop()
    9999    {
    100100        this->state_ = Stopped;
     
    109109            this->audioSource_ += 123455;
    110110            while (alIsSource(++this->audioSource_));
    111         }
     111           
     112            return true; // sound source destroyed - return true
     113        }
     114        return false; // nothing done - return false
    112115    }
    113116
Note: See TracChangeset for help on using the changeset viewer.