Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3342


Ignore:
Timestamp:
Jul 24, 2009, 2:14:24 PM (15 years ago)
Author:
rgrieder
Message:

Small stuff I found when browsing around.

Location:
code/branches/resource/src/orxonox/sound
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/orxonox/sound/SoundBase.cc

    r3196 r3342  
    6565    void SoundBase::update() {
    6666        if(this->entity_ != NULL && alIsSource(this->source_)) {
    67             Vector3 pos = this->entity_->getPosition();
     67            const Vector3& pos = this->entity_->getPosition();
    6868            alSource3f(this->source_, AL_POSITION, pos.x, pos.y, pos.z);
    6969            ALenum error = alGetError();
     
    7171                COUT(2) << "Sound: OpenAL: Invalid sound position" << std::endl;
    7272
    73             Vector3 vel = this->entity_->getVelocity();
     73            const Vector3& vel = this->entity_->getVelocity();
    7474            alSource3f(this->source_, AL_VELOCITY, vel.x, vel.y, vel.z);
    7575            error = alGetError();
     
    7777                COUT(2) << "Sound: OpenAL: Invalid sound velocity" << std::endl;
    7878
    79             Quaternion orient = this->entity_->getOrientation();
     79            const Quaternion& orient = this->entity_->getOrientation();
    8080            Vector3 at = orient.zAxis();
    8181            alSource3f(this->source_, AL_DIRECTION, at.x, at.y, at.z);
     
    190190        if(ov_open(f, &vf, NULL, 0) < 0)
    191191        {
    192             COUT(2) << "Sound: libvorbisfile: File seems not to be an Ogg Vorbis bitstream" << std::endl;
     192            COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl;
    193193            ov_clear(&vf);
    194194            return AL_NONE;
  • code/branches/resource/src/orxonox/sound/SoundManager.cc

    r3280 r3342  
    148148
    149149        // update listener orientation
    150         Quaternion orient = camera->getOrientation();
     150        const Quaternion& orient = camera->getOrientation();
    151151        Vector3 up = orient.xAxis(); // just a wild guess
    152152        Vector3 at = orient.zAxis();
Note: See TracChangeset for help on using the changeset viewer.