mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Added position audio.
This commit is contained in:
@@ -175,6 +175,36 @@ namespace openal
|
||||
return volume;
|
||||
}
|
||||
|
||||
void Audio::getPosition(float * v) const
|
||||
{
|
||||
alGetListenerfv(AL_POSITION, v);
|
||||
}
|
||||
|
||||
void Audio::setPosition(float * v)
|
||||
{
|
||||
alListenerfv(AL_POSITION, v);
|
||||
}
|
||||
|
||||
void Audio::getOrientation(float * v) const
|
||||
{
|
||||
alGetListenerfv(AL_ORIENTATION, v);
|
||||
}
|
||||
|
||||
void Audio::setOrientation(float * v)
|
||||
{
|
||||
alListenerfv(AL_ORIENTATION, v);
|
||||
}
|
||||
|
||||
void Audio::getVelocity(float * v) const
|
||||
{
|
||||
alGetListenerfv(AL_VELOCITY, v);
|
||||
}
|
||||
|
||||
void Audio::setVelocity(float * v)
|
||||
{
|
||||
alListenerfv(AL_VELOCITY, v);
|
||||
}
|
||||
|
||||
} // openal
|
||||
} // audio
|
||||
} // love
|
||||
|
||||
@@ -96,6 +96,13 @@ namespace openal
|
||||
void setVolume(float volume);
|
||||
float getVolume() const;
|
||||
|
||||
void getPosition(float * v) const;
|
||||
void setPosition(float * v);
|
||||
void getOrientation(float * v) const;
|
||||
void setOrientation(float * v);
|
||||
void getVelocity(float * v) const;
|
||||
void setVelocity(float * v);
|
||||
|
||||
}; // Audio
|
||||
|
||||
} // openal
|
||||
|
||||
@@ -163,6 +163,42 @@ namespace openal
|
||||
return volume;
|
||||
}
|
||||
|
||||
void Source::setPosition(float * v)
|
||||
{
|
||||
if(source)
|
||||
alSourcefv(source, AL_POSITION, v);
|
||||
}
|
||||
|
||||
void Source::getPosition(float * v) const
|
||||
{
|
||||
if(source)
|
||||
alGetSourcefv(source, AL_POSITION, v);
|
||||
}
|
||||
|
||||
void Source::setVelocity(float * v)
|
||||
{
|
||||
if(source)
|
||||
alSourcefv(source, AL_VELOCITY, v);
|
||||
}
|
||||
|
||||
void Source::getVelocity(float * v) const
|
||||
{
|
||||
if(source)
|
||||
alGetSourcefv(source, AL_VELOCITY, v);
|
||||
}
|
||||
|
||||
void Source::setDirection(float * v)
|
||||
{
|
||||
if(source)
|
||||
alSourcefv(source, AL_DIRECTION, v);
|
||||
}
|
||||
|
||||
void Source::getDirection(float * v) const
|
||||
{
|
||||
if(source)
|
||||
alGetSourcefv(source, AL_DIRECTION, v);
|
||||
}
|
||||
|
||||
} // openal
|
||||
} // audio
|
||||
} // love
|
||||
|
||||
@@ -67,6 +67,13 @@ namespace openal
|
||||
void setVolume(float volume);
|
||||
float getVolume() const;
|
||||
|
||||
void setPosition(float * v);
|
||||
void getPosition(float * v) const;
|
||||
void setVelocity(float * v);
|
||||
void getVelocity(float * v) const;
|
||||
void setDirection(float * v);
|
||||
void getDirection(float * v) const;
|
||||
|
||||
}; // Source
|
||||
|
||||
} // openal
|
||||
|
||||
Reference in New Issue
Block a user