Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2013, 3:43:45 PM (12 years ago)
Author:
smerkli
Message:

Merged sfxThilo branch, things seem to be working fine

Location:
code/branches/presentationHS13
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS13

  • code/branches/presentationHS13/src/orxonox/sound/AmbientSound.cc

    r8861 r9918  
    7979    }
    8080
    81     void AmbientSound::setAmbientSource(const std::string& source)
     81    bool AmbientSound::setAmbientSource(const std::string& source)
    8282    {
    8383        this->ambientSource_ = source;
    84         this->moodChanged(MoodManager::getInstance().getMood());
     84        return(this->moodChanged(MoodManager::getInstance().getMood()));
    8585    }
    8686
    87     void AmbientSound::moodChanged(const std::string& mood)
     87    bool AmbientSound::moodChanged(const std::string& mood)
    8888    {
    8989        if (GameMode::playsSound())
     
    9595                orxout(user_info) << "Loading ambient sound " << path << "..." << endl; // TODO: make this output internal if we implement sound streaming
    9696                this->setSource(path);
     97
     98                // all went fine
     99                return true;
    97100            }
    98101            else
    99102            {
    100103                orxout(internal_warning, context::sound) << this->ambientSource_ << ": Not a valid name! Ambient sound will not change." << endl;
     104
     105                // everything went southways
     106                return false;
    101107            }
    102108        }
     109        return false;
    103110    }
    104111
Note: See TracChangeset for help on using the changeset viewer.