Changeset 4206 in orxonox.OLD for orxonox/branches/openAL
- Timestamp:
- May 17, 2005, 2:30:10 AM (20 years ago)
- Location:
- orxonox/branches/openAL/src/lib/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/openAL/src/lib/sound/sound_engine.cc
r4205 r4206 21 21 #include "sound_engine.h" 22 22 23 //#include <AL/alc.h> // maybe later 24 23 25 #include "p_node.h" 24 26 #include "list.h" 25 #include "AL/alc.h"26 27 #include "resource_manager.h" 27 28 using namespace std; … … 104 105 105 106 107 /** 108 \brief Plays back a SoundSource 109 */ 106 110 void SoundSource::play() 107 111 { 108 112 alSourcePlay(this->sourceID); 109 113 } 114 115 /** 116 \brief Stops playback of a SoundSource 117 */ 110 118 void SoundSource::stop() 111 119 { 112 120 alSourceStop(this->sourceID); 113 121 } 122 123 /** 124 \brief Pauses Playback of a SoundSource 125 */ 114 126 void SoundSource::pause() 115 127 { … … 117 129 } 118 130 131 /** 132 \brief Rewinds Playback of a SoundSource 133 */ 134 void SoundSource::rewind() 135 { 136 alSourceRewind(this->sourceID); 137 } 138 139 /** 140 \brief sets the RolloffFactor of the Sound emitted from the SoundSource 141 \param rolloffFactor The Factor described 142 143 this tells openAL how fast the Sounds decay outward from the Source 144 */ 119 145 void SoundSource::setRolloffFactor(ALfloat rolloffFactor) 120 146 { … … 187 213 \brief creates a new SoundSource. 188 214 \param fileName The Name to load the SoundBuffer from 189 \param The sourceNode to bind this SoundSource to.215 \param sourceNode The sourceNode to bind this SoundSource to. 190 216 \returns The newly created SoundSource 191 217 … … 206 232 } 207 233 208 234 /** 235 \brief adds a SoundBuffer to the bufferList of the SoundEngine 236 \param buffer The buffer to add to the bufferList 237 */ 209 238 void SoundEngine::addBuffer(SoundBuffer* buffer) 210 239 { … … 212 241 } 213 242 243 /** 244 \brief removes a SoundBuffer from the bufferList of the SoundEngine 245 \param buffer The buffer to delete from the SoundEngine 246 */ 214 247 void SoundEngine::removeBuffer(SoundBuffer* buffer) 215 248 { … … 217 250 } 218 251 252 /** 253 \brief adds a SoundSource to the sourceList of the SoundEngine 254 \param source The source to add to the sourceList 255 */ 219 256 void SoundEngine::addSource(SoundSource* source) 220 257 { 221 258 this->sourceList->add(source); 222 259 } 260 261 /** 262 \brief removes a SoundSource from the sourceList of the SoundEngine 263 \param source The source to delete from the SoundEngine 264 */ 223 265 void SoundEngine::removeSource(SoundSource* source) 224 266 { … … 284 326 } 285 327 328 /** 329 \brief Transforms AL-errors into something readable 330 \param err The error found 331 */ 286 332 void SoundEngine::PrintALErrorString(ALenum err) 287 333 { … … 314 360 } 315 361 316 362 /* 317 363 void SoundEngine::PrintALCErrorString(ALenum err) 318 364 { … … 344 390 }; 345 391 } 392 */ -
orxonox/branches/openAL/src/lib/sound/sound_engine.h
r4205 r4206 12 12 13 13 14 #define SOUND_DOPPLER_FACTOR 0.01 15 #define SOUND_DOPPLER_VELOCITY 500000000 14 #define SOUND_DOPPLER_FACTOR 0.01 //!< A factor for the audible doppler effect 15 #define SOUND_DOPPLER_VELOCITY 500000000 //!< A factor for the TravelSpeed of sound 16 16 17 17 // FORWARD DEFINITION … … 27 27 ~SoundBuffer(void); 28 28 29 /** \returns the ID of the buffer */ 29 30 inline ALuint getID(void) { return this->bufferID; } 30 31 … … 47 48 void stop(); 48 49 void pause(); 50 void rewind(); 49 51 50 52 // development functions 51 /** \ret runs The ID of the Source */53 /** \returns The ID of the Source */ 52 54 inline ALuint getID(void) { return this->sourceID; } 53 55 /** \returns the SourceNode of this Source */ … … 86 88 // error handling: 87 89 static void PrintALErrorString(ALenum err); 88 static void PrintALCErrorString(ALenum err);90 // static void PrintALCErrorString(ALenum err); 89 91 90 92 private:
Note: See TracChangeset
for help on using the changeset viewer.