Changeset 9869 in orxonox.OLD for trunk/src/lib/sound/sound_source.h
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/sound_source.h
r8793 r9869 8 8 9 9 #include "base_object.h" 10 #include "sound_buffer.h" 10 11 #include "alincl.h" 11 12 … … 14 15 namespace OrxSound 15 16 { 16 class SoundBuffer;17 17 //! A class that represents a SoundSource 18 18 class SoundSource : public BaseObject 19 19 { 20 ObjectListDeclaration(SoundSource); 20 21 public: 21 SoundSource(const PNode* sourceNode = NULL, const SoundBuffer * buffer = NULL);22 SoundSource(const PNode* sourceNode = NULL, const SoundBuffer& buffer = SoundBuffer()); 22 23 SoundSource(const SoundSource& source); 23 24 SoundSource& operator=(const SoundSource& source); … … 28 29 // user interaction 29 30 void play(); 30 void play(const SoundBuffer *buffer);31 void play(const SoundBuffer *buffer, float gain);32 void play(const SoundBuffer *buffer, float gain, bool loop);31 void play(const SoundBuffer& buffer); 32 void play(const SoundBuffer& buffer, float gain); 33 void play(const SoundBuffer& buffer, float gain, bool loop); 33 34 34 void gain(const SoundBuffer *buffer, float gain);35 void gain(const SoundBuffer& buffer, float gain); 35 36 36 37 void stop(); 37 38 void pause(); 38 39 void rewind(); 39 void fadein(const SoundBuffer *buffer, ALfloat duration);40 void fadein(const SoundBuffer& buffer, ALfloat duration); 40 41 41 42 // development functions … … 46 47 void setSourceNode(const PNode* sourceNode); 47 48 /** @returns the SoundBuffer of this Source */ 48 inline const SoundBuffer *getBuffer() const { return this->buffer; };49 inline const SoundBuffer& getBuffer() const { return this->buffer; }; 49 50 /** @returns the SourceNode of this Source */ 50 51 inline const PNode* getNode() const { return this->sourceNode; }; … … 65 66 bool resident; //!< If the alSource should be resident (if true, the alSource will be returned on deletion). 66 67 ALuint sourceID; //!< The ID of the Source 67 const SoundBuffer*buffer; //!< The buffer to play in this source.68 SoundBuffer buffer; //!< The buffer to play in this source. 68 69 const PNode* sourceNode; //!< The SourceNode representing the position/velocity... of this source. 69 70 };
Note: See TracChangeset
for help on using the changeset viewer.