[Orxonox-commit 822] r3342 - branches/resource/src/orxonox/sound
rgrieder at orxonox.net
rgrieder at orxonox.net
Fri Jul 24 14:14:25 CEST 2009
Author: rgrieder
Date: 2009-07-24 14:14:24 +0200 (Fri, 24 Jul 2009)
New Revision: 3342
Modified:
branches/resource/src/orxonox/sound/SoundBase.cc
branches/resource/src/orxonox/sound/SoundManager.cc
Log:
Small stuff I found when browsing around.
Modified: branches/resource/src/orxonox/sound/SoundBase.cc
===================================================================
--- branches/resource/src/orxonox/sound/SoundBase.cc 2009-07-24 09:17:34 UTC (rev 3341)
+++ branches/resource/src/orxonox/sound/SoundBase.cc 2009-07-24 12:14:24 UTC (rev 3342)
@@ -64,19 +64,19 @@
void SoundBase::update() {
if(this->entity_ != NULL && alIsSource(this->source_)) {
- Vector3 pos = this->entity_->getPosition();
+ const Vector3& pos = this->entity_->getPosition();
alSource3f(this->source_, AL_POSITION, pos.x, pos.y, pos.z);
ALenum error = alGetError();
if(error == AL_INVALID_VALUE)
COUT(2) << "Sound: OpenAL: Invalid sound position" << std::endl;
- Vector3 vel = this->entity_->getVelocity();
+ const Vector3& vel = this->entity_->getVelocity();
alSource3f(this->source_, AL_VELOCITY, vel.x, vel.y, vel.z);
error = alGetError();
if(error == AL_INVALID_VALUE)
COUT(2) << "Sound: OpenAL: Invalid sound velocity" << std::endl;
- Quaternion orient = this->entity_->getOrientation();
+ const Quaternion& orient = this->entity_->getOrientation();
Vector3 at = orient.zAxis();
alSource3f(this->source_, AL_DIRECTION, at.x, at.y, at.z);
error = alGetError();
@@ -189,7 +189,7 @@
if(ov_open(f, &vf, NULL, 0) < 0)
{
- COUT(2) << "Sound: libvorbisfile: File seems not to be an Ogg Vorbis bitstream" << std::endl;
+ COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl;
ov_clear(&vf);
return AL_NONE;
}
Modified: branches/resource/src/orxonox/sound/SoundManager.cc
===================================================================
--- branches/resource/src/orxonox/sound/SoundManager.cc 2009-07-24 09:17:34 UTC (rev 3341)
+++ branches/resource/src/orxonox/sound/SoundManager.cc 2009-07-24 12:14:24 UTC (rev 3342)
@@ -147,7 +147,7 @@
COUT(2) << "Sound: OpenAL: Invalid listener position" << std::endl;
// update listener orientation
- Quaternion orient = camera->getOrientation();
+ const Quaternion& orient = camera->getOrientation();
Vector3 up = orient.xAxis(); // just a wild guess
Vector3 at = orient.zAxis();
More information about the Orxonox-commit
mailing list