Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6509 for code/branches/sound5


Ignore:
Timestamp:
Mar 11, 2010, 3:58:42 PM (15 years ago)
Author:
erwin
Message:

Committing spreeeee! Hardcoded source init

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sound5/src/orxonox/sound/AmbientSound.cc

    r6507 r6509  
    172172
    173173        this->soundstreamthread_ = boost::thread(SoundStreamer(), this->audioSource_, dataStream);
    174         this->initialiseSource();
     174
     175        this->updateVolume();
     176        this->setPitch(this->getPitch());
     177        this->setLooping(this->getLooping());
     178        alSource3f(this->audioSource_, AL_POSITION,  0, 0, 0);
     179        alSource3f(this->audioSource_, AL_VELOCITY,  0, 0, 0);
     180        alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0);
     181        if (ALint error = alGetError())
     182            COUT(2) << "Sound: Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl;
    175183    }
    176184
Note: See TracChangeset for help on using the changeset viewer.