Changeset 5386 in orxonox.OLD for trunk/src/lib/sound/sound_source.h
- Timestamp:
- Oct 15, 2005, 11:44:14 PM (19 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/sound_source.h
r5382 r5386 1 1 /*! 2 * @file proto_class.h3 * @brief Definition of ...2 * @file sound_source.h 3 * @brief Definition of the SoundSource. 4 4 */ 5 5 6 #ifndef _ PROTO_CLASS_H7 #define _ PROTO_CLASS_H6 #ifndef _SOUND_SOURCE_H 7 #define _SOUND_SOURCE_H 8 8 9 9 #include "base_object.h" 10 #include "alincl.h" 10 11 11 12 // FORWARD DECLARATION 13 class SoundBuffer; 14 class PNode; 12 15 16 //! A class that represents a SoundSource 17 class SoundSource : public BaseObject 18 { 19 public: 20 SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL); 21 ~SoundSource(); 13 22 23 // user interaction 24 void play(); 25 void play(const SoundBuffer* buffer); 26 void stop(); 27 void pause(); 28 void rewind(); 14 29 15 //! A class for ... 16 class ProtoClass : public BaseObject { 30 // development functions 31 /** @returns The ID of this Source */ 32 inline ALuint getID() const { return this->sourceID; } 33 /** @returns the SoundBuffer of this Source */ 34 inline const SoundBuffer* getBuffer() const { return this->buffer; } 35 /** @returns the SourceNode of this Source */ 36 inline const PNode* getNode() const { return this->sourceNode;} 17 37 18 public: 19 ProtoClass(); 20 virtual ~ProtoClass(); 38 void setRolloffFactor(ALfloat rolloffFactor); 21 39 22 23 private: 24 40 private: 41 ALuint sourceID; //!< The ID of the Source 42 const SoundBuffer* buffer; //!< The buffer to play in this source. 43 const PNode* sourceNode; //!< The SourceNode represente the position/velocity... of this source. 25 44 }; 26 27 #endif /* _PROTO_CLASS_H */ 45 #endif /* _SOUND_SOURCE_H */
Note: See TracChangeset
for help on using the changeset viewer.