- Timestamp:
- Nov 22, 2009, 4:01:16 PM (14 years ago)
- Location:
- code/branches/presentation2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2
- Property svn:mergeinfo changed
/code/branches/sound3 (added) merged: 5941,5943,5946,5954,5956-5957,5962,5982,6031,6046,6069-6072,6074,6088,6093,6097,6100,6102
- Property svn:mergeinfo changed
-
code/branches/presentation2/src/orxonox/sound/BaseSound.h
r5929 r6117 26 26 * 27 27 */ 28 28 29 #ifndef _BaseSound_H__ 29 30 #define _BaseSound_H__ … … 32 33 33 34 #include <string> 34 #include <OgreSharedPtr.h>35 35 #include <OgreDataStream.h> 36 36 #include "core/OrxonoxClass.h" … … 49 49 virtual ~BaseSound(); 50 50 51 void play(); 52 void stop(); 53 void pause(); 51 void XMLPortExtern(Element& xmlelement, XMLPort::Mode mode); 54 52 55 bool isPlaying();56 bool isPaused();57 bool isStopped();53 virtual void play(); 54 virtual void stop(); 55 virtual void pause(); 58 56 59 void setSource(const std::string& source); 60 const std::string& getSource() { return this->source_; } 57 bool isPlaying() { return this->state_ == Playing; } 58 bool isPaused() { return this->state_ == Paused; } 59 bool isStopped() { return this->state_ == Stopped; } 61 60 62 bool getPlayOnLoad() { return this->bPlayOnLoad_; }63 v oid setPlayOnLoad(bool val);61 virtual void setSource(const std::string& source); 62 virtual const std::string& getSource() const { return this->source_; } 64 63 65 bool getLoop() { return this->bLoop_; } 66 void setLoop(bool val) { this->bLoop_ = val; } 64 void setVolume(float vol); 65 float getVolume() const { return this->volume_; } 66 67 bool getLooping() const { return this->bLoop_; } 68 void setLooping(bool val); 69 70 //ALuint getALAudioSource(void); 67 71 68 72 protected: 69 73 ALuint loadOggFile(); 70 ALint getSourceState();71 74 72 75 ALuint audioSource_; … … 74 77 75 78 private: 76 std::string source_; 77 bool bPlayOnLoad_; 78 bool bLoop_; 79 DataStreamPtr dataStream_; 79 enum State 80 { 81 Stopped, 82 Playing, 83 Paused 84 }; 85 86 std::string source_; 87 float volume_; 88 bool bLoop_; 89 State state_; 90 DataStreamPtr dataStream_; 80 91 }; 81 92 }
Note: See TracChangeset
for help on using the changeset viewer.