Renamed Source:setRelativePosition and Source:hasRelativePosition to Source:setRelative and Source:isRelative. Updated changelog.

This commit is contained in:
Alex Szpakowski
2013-10-25 17:05:29 -03:00
parent 4e1c73c1f2
commit b57256b3e5
8 changed files with 32 additions and 28 deletions
+7 -7
View File
@@ -39,7 +39,7 @@ Source::Source(Pool *pool, love::sound::SoundData *soundData)
, valid(false)
, pitch(1.0f)
, volume(1.0f)
, relativePosition(false)
, relative(false)
, looping(false)
, paused(false)
, minVolume(0.0f)
@@ -71,7 +71,7 @@ Source::Source(Pool *pool, love::sound::Decoder *decoder)
, valid(false)
, pitch(1.0f)
, volume(1.0f)
, relativePosition(false)
, relative(false)
, looping(false)
, paused(false)
, minVolume(0.0f)
@@ -429,17 +429,17 @@ void Source::getCone(float &innerAngle, float &outerAngle, float &outerVolume) c
outerVolume = cone.outerVolume;
}
void Source::setRelativePosition(bool relative)
void Source::setRelative(bool enable)
{
if (valid)
alSourcei(source, AL_SOURCE_RELATIVE, relative ? AL_TRUE : AL_FALSE);
relativePosition = relative;
relative = enable;
}
bool Source::hasRelativePosition() const
bool Source::isRelative() const
{
return relativePosition;
return relative;
}
void Source::setLooping(bool looping)
@@ -575,7 +575,7 @@ void Source::reset()
alSourcef(source, AL_ROLLOFF_FACTOR, rolloffFactor);
alSourcef(source, AL_MAX_DISTANCE, maxDistance);
alSourcei(source, AL_LOOPING, isStatic() && isLooping() ? AL_TRUE : AL_FALSE);
alSourcei(source, AL_SOURCE_RELATIVE, relativePosition ? AL_TRUE : AL_FALSE);
alSourcei(source, AL_SOURCE_RELATIVE, relative ? AL_TRUE : AL_FALSE);
alSourcei(source, AL_CONE_INNER_ANGLE, cone.innerAngle);
alSourcei(source, AL_CONE_OUTER_ANGLE, cone.outerAngle);
alSourcef(source, AL_CONE_OUTER_GAIN, cone.outerVolume);
+3 -3
View File
@@ -80,8 +80,8 @@ public:
virtual void getDirection(float *v) const;
virtual void setCone(float innerAngle, float outerAngle, float outerVolume);
virtual void getCone(float &innerAngle, float &outerAngle, float &outerVolume) const;
virtual void setRelativePosition(bool relative);
virtual bool hasRelativePosition() const;
virtual void setRelative(bool enable);
virtual bool isRelative() const;
void setLooping(bool looping);
bool isLooping() const;
bool isStatic() const;
@@ -131,7 +131,7 @@ private:
float position[3];
float velocity[3];
float direction[3];
bool relativePosition;
bool relative;
bool looping;
bool paused;
float minVolume;