Changeset 5386 in orxonox.OLD for trunk/src/lib/sound/sound_engine.h
- Timestamp:
- Oct 15, 2005, 11:44:14 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/sound_engine.h
r5216 r5386 10 10 #include "alincl.h" 11 11 12 #include "sound_buffer.h" 13 #include "sound_source.h" 14 12 15 #define SOUND_DOPPLER_FACTOR 0.001 //!< A factor for the audible doppler effect 13 16 #define SOUND_DOPPLER_VELOCITY 5000000 //!< A factor for the TravelSpeed of sound … … 17 20 template<class T> class tList; 18 21 class IniParser; 19 20 21 //! A class that represents a datastructure to play Sounds.22 class SoundBuffer : public BaseObject23 {24 public:25 SoundBuffer(const char* fileName);26 ~SoundBuffer();27 28 /** @returns the ID of the buffer used in this SoundBuffer */29 inline ALuint getID() const { return this->bufferID; }30 31 private:32 ALuint bufferID; //!< The address of the Buffer.33 34 ALsizei size; //!< The size of the Buffer.35 ALboolean loop; //!< loop information.36 };37 38 //! A class that represents a SoundSource39 class SoundSource : public BaseObject40 {41 public:42 SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL);43 ~SoundSource();44 45 // user interaction46 void play();47 void play(const SoundBuffer* buffer);48 void stop();49 void pause();50 void rewind();51 52 // development functions53 /** @returns The ID of this Source */54 inline ALuint getID() const { return this->sourceID; }55 /** @returns the SoundBuffer of this Source */56 inline const SoundBuffer* getBuffer() const { return this->buffer; }57 /** @returns the SourceNode of this Source */58 inline const PNode* getNode() const { return this->sourceNode;}59 60 void setRolloffFactor(ALfloat rolloffFactor);61 62 private:63 ALuint sourceID; //!< The ID of the Source64 const SoundBuffer* buffer; //!< The buffer to play in this source.65 const PNode* sourceNode; //!< The SourceNode represente the position/velocity... of this source.66 };67 68 69 22 70 23 //! A class that handles audio via the openAudioLibrary
Note: See TracChangeset
for help on using the changeset viewer.