- Timestamp:
- Dec 14, 2009, 12:51:34 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
r6332 r6349 314 314 { 315 315 if (oldAmbient == NULL || ambientSounds_.empty()) 316 {317 316 return; 318 } 317 319 318 if (this->ambientSounds_.front().first == oldAmbient) 320 319 { … … 468 467 469 468 470 void SoundManager::fadeIn( AmbientSound*sound)469 void SoundManager::fadeIn(const SmartPtr<AmbientSound>& sound) 471 470 { 472 471 // If we're already fading out --> remove that 473 for (std::list< AmbientSound*>::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++)472 for (std::list<SmartPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++) 474 473 { 475 474 if (*it == sound) … … 484 483 } 485 484 486 void SoundManager::fadeOut( AmbientSound*sound)485 void SoundManager::fadeOut(const SmartPtr<AmbientSound>& sound) 487 486 { 488 487 // If we're already fading in --> remove that 489 for (std::list< AmbientSound*>::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++)488 for (std::list<SmartPtr<AmbientSound> >::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++) 490 489 { 491 490 if (*it == sound) … … 510 509 511 510 // FADE IN 512 for (std::list< AmbientSound*>::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); )511 for (std::list<SmartPtr<AmbientSound> >::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); ) 513 512 { 514 513 if ((*it)->getVolume() + this->crossFadeStep_*dt > 1.0f) … … 525 524 526 525 // FADE OUT 527 for (std::list< AmbientSound*>::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); )526 for (std::list<SmartPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); ) 528 527 { 529 528 if ((*it)->getVolume() - this->crossFadeStep_*dt < 0.0f)
Note: See TracChangeset
for help on using the changeset viewer.