Changeset 6372 for code/branches/presentation2/src/orxonox/sound
- Timestamp:
- Dec 17, 2009, 4:52:45 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/BaseSound.cc
r6370 r6372 132 132 alSource3f(this->audioSource_, AL_VELOCITY, 0, 0, 0); 133 133 alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0); 134 alSourcei(this->audioSource_, AL_REFERENCE_DISTANCE, 20);135 alSourcei(this->audioSource_, AL_MAX_DISTANCE, 10000);136 134 if (ALint error = alGetError()) 137 135 COUT(2) << "Sound Warning: Setting source parameters to 0 failed: " -
code/branches/presentation2/src/orxonox/sound/WorldSound.cc
r6370 r6372 35 35 #include "core/EventIncludes.h" 36 36 #include "core/XMLPort.h" 37 #include "Scene.h" 37 38 #include "SoundManager.h" 38 39 #include <core/ConsoleCommandCompilation.h> … … 79 80 { 80 81 BaseSound::initialiseSource(); 82 if (this->getScene()) 83 { 84 float refDist = this->getScene()->getSoundReferenceDistance(); 85 alSourcei(this->audioSource_, AL_REFERENCE_DISTANCE, refDist); 86 // TODO: 500 is very magical here. Derive something better 87 alSourcei(this->audioSource_, AL_MAX_DISTANCE, refDist * 500); 88 } 81 89 this->tick(0); // update position, orientation and velocity 82 90 }
Note: See TracChangeset
for help on using the changeset viewer.