31 , sound_manager(soundManager)
32 , source_index(sourceIndex)
36 , position(Vector3::ZERO)
37 , velocity(Vector3::ZERO)
59 if (value != AL_PLAYING)
72 float distance = (pos -
position).length();
78 else if (distance < sound_manager->REFERENCE_DISTANCE)
94 return (value == AL_PLAYING);
127 if (gain_ == this->
gain)
136 if (loop_ == this->
loop)
145 if (pitch_ == this->
pitch)
148 this->
pitch = pitch_;
void computeAudibility(Ogre::Vector3 pos)
void setVelocity(Ogre::Vector3 vel)
void setPitch(float pitch)
void setPosition(Ogre::Vector3 pos)
Sound(ALuint buffer, SoundManager *soundManager, int sourceIndex)
SoundManager * sound_manager
static const float MAX_DISTANCE
void recomputeSource(int source_index, int reason, float vfl, Ogre::Vector3 *vvec)
Computes audibility of an audio source and retires it if it is inaudible.
ALuint getHardwareSource(int hardware_index)
Returns the AL handle for the hardware source with the provided index.
static const float REFERENCE_DISTANCE
static const float ROLLOFF_FACTOR