Changeset 5899 for code/branches/core5/src/orxonox/sound/WorldSound.cc
- Timestamp:
- Oct 7, 2009, 11:19:19 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/sound/WorldSound.cc
r5897 r5899 52 52 { 53 53 SUPER(WorldSound, XMLPort, xmlelement, mode); 54 XMLPortParamExtern(WorldSound, BaseSound, this, "sou ndFile", setSoundFile, getSoundFile, xmlelement, mode);54 XMLPortParamExtern(WorldSound, BaseSound, this, "source", setSource, getSource, xmlelement, mode); 55 55 XMLPortParamExtern(WorldSound, BaseSound, this, "loop", setLoop, getLoop, xmlelement, mode); 56 56 XMLPortParamExtern(WorldSound, BaseSound, this, "playOnLoad", setPlayOnLoad, getPlayOnLoad, xmlelement, mode); … … 65 65 void WorldSound::tick(float dt) 66 66 { 67 if (alIsSource(this-> source_))67 if (alIsSource(this->audioSource_)) 68 68 { 69 69 const Vector3& pos = this->getWorldPosition(); 70 alSource3f(this-> source_, AL_POSITION, pos.x, pos.y, pos.z);70 alSource3f(this->audioSource_, AL_POSITION, pos.x, pos.y, pos.z); 71 71 ALenum error = alGetError(); 72 72 if (error == AL_INVALID_VALUE) … … 74 74 75 75 const Vector3& vel = this->getVelocity(); 76 alSource3f(this-> source_, AL_VELOCITY, vel.x, vel.y, vel.z);76 alSource3f(this->audioSource_, AL_VELOCITY, vel.x, vel.y, vel.z); 77 77 error = alGetError(); 78 78 if (error == AL_INVALID_VALUE) … … 81 81 const Quaternion& orient = this->getWorldOrientation(); 82 82 Vector3 at = orient.zAxis(); 83 alSource3f(this-> source_, AL_DIRECTION, at.x, at.y, at.z);83 alSource3f(this->audioSource_, AL_DIRECTION, at.x, at.y, at.z); 84 84 error = alGetError(); 85 85 if (error == AL_INVALID_VALUE)
Note: See TracChangeset
for help on using the changeset viewer.