Changeset 3342 for code/branches/resource/src/orxonox/sound
- Timestamp:
- Jul 24, 2009, 2:14:24 PM (15 years ago)
- Location:
- code/branches/resource/src/orxonox/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/orxonox/sound/SoundBase.cc
r3196 r3342 65 65 void SoundBase::update() { 66 66 if(this->entity_ != NULL && alIsSource(this->source_)) { 67 Vector3pos = this->entity_->getPosition();67 const Vector3& pos = this->entity_->getPosition(); 68 68 alSource3f(this->source_, AL_POSITION, pos.x, pos.y, pos.z); 69 69 ALenum error = alGetError(); … … 71 71 COUT(2) << "Sound: OpenAL: Invalid sound position" << std::endl; 72 72 73 Vector3vel = this->entity_->getVelocity();73 const Vector3& vel = this->entity_->getVelocity(); 74 74 alSource3f(this->source_, AL_VELOCITY, vel.x, vel.y, vel.z); 75 75 error = alGetError(); … … 77 77 COUT(2) << "Sound: OpenAL: Invalid sound velocity" << std::endl; 78 78 79 Quaternionorient = this->entity_->getOrientation();79 const Quaternion& orient = this->entity_->getOrientation(); 80 80 Vector3 at = orient.zAxis(); 81 81 alSource3f(this->source_, AL_DIRECTION, at.x, at.y, at.z); … … 190 190 if(ov_open(f, &vf, NULL, 0) < 0) 191 191 { 192 COUT(2) << "Sound: libvorbisfile: File seems notto be an Ogg Vorbis bitstream" << std::endl;192 COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl; 193 193 ov_clear(&vf); 194 194 return AL_NONE; -
code/branches/resource/src/orxonox/sound/SoundManager.cc
r3280 r3342 148 148 149 149 // update listener orientation 150 Quaternionorient = camera->getOrientation();150 const Quaternion& orient = camera->getOrientation(); 151 151 Vector3 up = orient.xAxis(); // just a wild guess 152 152 Vector3 at = orient.zAxis();
Note: See TracChangeset
for help on using the changeset viewer.