Changeset 10555 for code/branches/core7/src/orxonox/sound/SoundManager.cc
- Timestamp:
- Aug 29, 2015, 5:35:59 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/orxonox/sound/SoundManager.cc
r10464 r10555 165 165 SoundManager::~SoundManager() 166 166 { 167 // Erase fade lists because of the s martpointers167 // Erase fade lists because of the strong pointers 168 168 this->bDestructorCalled_ = true; 169 169 this->fadeInList_.clear(); … … 419 419 } 420 420 421 void SoundManager::fadeIn(const S martPtr<AmbientSound>& sound)421 void SoundManager::fadeIn(const StrongPtr<AmbientSound>& sound) 422 422 { 423 423 // If we're already fading out --> remove that 424 for (std::list<S martPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++)424 for (std::list<StrongPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++) 425 425 { 426 426 if (*it == sound) … … 435 435 } 436 436 437 void SoundManager::fadeOut(const S martPtr<AmbientSound>& sound)437 void SoundManager::fadeOut(const StrongPtr<AmbientSound>& sound) 438 438 { 439 439 // If we're already fading in --> remove that 440 for (std::list<S martPtr<AmbientSound> >::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++)440 for (std::list<StrongPtr<AmbientSound> >::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++) 441 441 { 442 442 if (*it == sound) … … 461 461 462 462 // FADE IN 463 for (std::list<S martPtr<AmbientSound> >::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); )463 for (std::list<StrongPtr<AmbientSound> >::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); ) 464 464 { 465 465 if ((*it)->getVolume() + this->crossFadeStep_*dt > 1.0f) … … 476 476 477 477 // FADE OUT 478 for (std::list<S martPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); )478 for (std::list<StrongPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); ) 479 479 { 480 480 if ((*it)->getVolume() - this->crossFadeStep_*dt < 0.0f)
Note: See TracChangeset
for help on using the changeset viewer.