Fixed Listener's functions being private in SFML.Net

Added a function to set a sound's position relative to the listener

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1059 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
laurentgom 2009-03-22 18:36:03 +00:00
parent 631bcc8c5f
commit 40b4bda26b
20 changed files with 295 additions and 52 deletions

View file

@ -175,6 +175,17 @@ void Sound::SetPosition(const Vector3f& Position)
}
////////////////////////////////////////////////////////////
/// Make the sound's position relative to the listener's
/// position, or absolute.
/// The default value is false (absolute)
////////////////////////////////////////////////////////////
void Sound::SetRelativeToListener(bool Relative)
{
ALCheck(alSourcei(mySource, AL_SOURCE_RELATIVE, Relative));
}
////////////////////////////////////////////////////////////
/// Set the minimum distance - closer than this distance,
/// the listener will hear the sound at its maximum volume.
@ -263,6 +274,19 @@ Vector3f Sound::GetPosition() const
}
////////////////////////////////////////////////////////////
/// Tell if the sound's position is relative to the listener's
/// position, or if it's absolute
////////////////////////////////////////////////////////////
bool Sound::IsRelativeToListener() const
{
ALint Relative;
ALCheck(alGetSourcei(mySource, AL_SOURCE_RELATIVE, &Relative));
return Relative != 0;
}
////////////////////////////////////////////////////////////
/// Get the minimum distance
////////////////////////////////////////////////////////////