Changeset 9805 in orxonox.OLD for branches/new_class_id/src/lib/sound/sound_source.h
- Timestamp:
- Sep 24, 2006, 3:21:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/sound/sound_source.h
r9715 r9805 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 … … 20 20 ObjectListDeclaration(SoundSource); 21 21 public: 22 SoundSource(const PNode* sourceNode = NULL, const SoundBuffer * buffer = NULL);22 SoundSource(const PNode* sourceNode = NULL, const SoundBuffer& buffer = SoundBuffer()); 23 23 SoundSource(const SoundSource& source); 24 24 SoundSource& operator=(const SoundSource& source); … … 29 29 // user interaction 30 30 void play(); 31 void play(const SoundBuffer *buffer);32 void play(const SoundBuffer *buffer, float gain);33 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); 34 34 35 void gain(const SoundBuffer *buffer, float gain);35 void gain(const SoundBuffer& buffer, float gain); 36 36 37 37 void stop(); 38 38 void pause(); 39 39 void rewind(); 40 void fadein(const SoundBuffer *buffer, ALfloat duration);40 void fadein(const SoundBuffer& buffer, ALfloat duration); 41 41 42 42 // development functions … … 47 47 void setSourceNode(const PNode* sourceNode); 48 48 /** @returns the SoundBuffer of this Source */ 49 inline const SoundBuffer *getBuffer() const { return this->buffer; };49 inline const SoundBuffer& getBuffer() const { return this->buffer; }; 50 50 /** @returns the SourceNode of this Source */ 51 51 inline const PNode* getNode() const { return this->sourceNode; }; … … 66 66 bool resident; //!< If the alSource should be resident (if true, the alSource will be returned on deletion). 67 67 ALuint sourceID; //!< The ID of the Source 68 const SoundBuffer*buffer; //!< The buffer to play in this source.68 SoundBuffer buffer; //!< The buffer to play in this source. 69 69 const PNode* sourceNode; //!< The SourceNode representing the position/velocity... of this source. 70 70 };
Note: See TracChangeset
for help on using the changeset viewer.