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:
parent
631bcc8c5f
commit
40b4bda26b
20 changed files with 295 additions and 52 deletions
|
@ -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
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue