- Timestamp:
- Dec 19, 2009, 12:18:41 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/AmbientSound.h
r6370 r6382 50 50 public: 51 51 AmbientSound(BaseObject* creator); 52 ~AmbientSound();53 52 54 53 void XMLPort(Element& xmlelement, XMLPort::Mode mode); … … 61 60 62 61 void setAmbientSource(const std::string& source); 63 const std::string& getAmbientSource() const { return this->ambientSource_; } 64 inline void ambientSourceChanged(){ this->setAmbientSource(this->ambientSource_); } 62 inline const std::string& getAmbientSource() const 63 { return this->ambientSource_; } 64 65 void setPlayOnLoad(bool val); 66 bool getPlayOnLoad() const 67 { return this->bPlayOnLoad_; } 68 69 protected: 70 ~AmbientSound() { } 65 71 66 72 private: 67 virtual void preDestroy(); 68 void doPlay(); 69 void doStop(); 70 void doPause(); 73 void preDestroy(); 71 74 void registerVariables(); 72 75 float getRealVolume(); 76 inline void ambientSourceChanged() 77 { this->setAmbientSource(this->ambientSource_); } 78 inline void playOnLoadChanged() 79 { this->setPlayOnLoad(this->bPlayOnLoad_); } 73 80 74 81 std::string ambientSource_; //!< Analogous to source_, but mood independent 82 bool bPlayOnLoad_; //!< Play the sound immediately when loaded 75 83 }; 76 84 }
Note: See TracChangeset
for help on using the changeset viewer.