- Timestamp:
- May 16, 2005, 11:46:23 PM (20 years ago)
- Location:
- orxonox/branches/openAL/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/openAL/src/lib/sound/sound_engine.cc
r4198 r4200 74 74 // alSourcefv(sourceID, AL_POSITION, SourcePos); 75 75 // alSourcefv(sourceID, AL_VELOCITY, SourceVel); 76 alSourcei (sourceID, AL_LOOPING, true ); 77 78 76 alSourcei (sourceID, AL_LOOPING, true ); 79 77 } 80 78 … … 98 96 alSourcePause(this->sourceID); 99 97 } 98 99 void SoundSource::setRolloffFactor(ALfloat rolloffFactor) 100 { 101 alSourcef(this->sourceID, AL_ROLLOFF_FACTOR, rolloffFactor); 102 } 103 100 104 101 105 … … 221 225 alutInit(NULL, 0); 222 226 alGetError(); 223 } 224 227 228 alDopplerFactor(SOUND_DOPPLER_FACTOR); 229 alDopplerVelocity(SOUND_DOPPLER_VELOCITY); 230 } 231 -
orxonox/branches/openAL/src/lib/sound/sound_engine.h
r4197 r4200 10 10 #include "base_object.h" 11 11 #include "alincl.h" 12 13 14 #define SOUND_DOPPLER_FACTOR 0.1 15 #define SOUND_DOPPLER_VELOCITY 500000000 12 16 13 17 // FORWARD DEFINITION … … 43 47 void stop(); 44 48 void pause(); 45 46 49 47 50 // development functions … … 50 53 /** \returns the SourceNode of this Source */ 51 54 inline PNode* getNode(void) { return this->sourceNode;} 55 56 void setRolloffFactor(ALfloat rolloffFactor); 52 57 53 58 private: -
orxonox/branches/openAL/src/story_entities/world.cc
r4198 r4200 490 490 491 491 SoundEngine::getInstance()->setListener(tn); 492 SoundBuffer* tBuffer = new SoundBuffer(ResourceManager::getFullName("sound/explo.wav"));492 SoundBuffer* tBuffer = new SoundBuffer(ResourceManager::getFullName("sound/explo.wav")); 493 493 SoundSource* tSound = new SoundSource(tBuffer, this->localPlayer); 494 tSound->setRolloffFactor(0.1); 494 495 tSound->play(); 495 496
Note: See TracChangeset
for help on using the changeset viewer.